The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
2answers
167 views

check patterns that don't exist in sqlite

I explained a similar situation with plain text files on Grep huge number of patterns from huge file. Many people there said I should, so now I'm migrating my data to a sqlite database: I have a file ...
3
votes
2answers
2k views

Insert to oracle table in a loop

Requirement: In one server in a directory multiple files are present. I need to read the file names and populate into a oracle table. I have written the script like this, but its not working: ...
3
votes
2answers
6k views

Replace all occurrences of a character in a variable using korn script

Part of the Korn script I am writing requires that I replace all occurrences of the ' character with two occurrences (''). I am trying to log some SQL that I am generating in this script to a column ...
3
votes
1answer
429 views

An efficient filter for .sql files with just “INSERT INTO”

Several times I've found myself working on data that has been exported to .sql files that I want to process rather than import into a database. I'm only talking about "pure data" sql files. Ones that ...
2
votes
3answers
475 views

Adding breaks between every two words in bash

My Query is: QUERY="SELECT 'Your Name:', FullName, 'Your Phone:', Phone, 'Email:', Email FROM Table1 JOIN WHERE EmpID=001;" The output I get is Your Name: Samanta Your Phone: 111-111-1111 Email: ...
2
votes
4answers
69 views

Tool for escaping all quotes in a string/file

I have a weird problem that I don't have a good way around. My company, because reasons, stores scripting code in a database table. Don't ask. Whenever I have to insert a new version of the code, I ...
2
votes
2answers
95 views

A combination of uniq and agrep?

I have a file full of long SQL queries, one per line. I need to create a list of unique queries, but most of the queries include parameter values that make using an exact matching tool like uniq ...
1
vote
2answers
171 views

Can sed be used to generate a load file for my date lookup fact table?

I have an SQL fact table which is used for looking up a date and returning another date. The table schema is as follows: TABLE date_lookup ( pk_date DATE, plus1_months DATE, plus2_months DATE, ...
1
vote
1answer
262 views

Convert XML to SQL INSERT statements using the command line

Is there a way to convert XML to SQL INSERT using the command line, here is examples: <something> <somthingelse>lol</somethingelse> </something> would be INSERT INTO ...
1
vote
1answer
794 views

Error out shell script if plsql program fails

In the shell script, I am calling a PLSQL stored procedure sqlplus -s <<EOF $v_fcp_login set head off feed off serverout on size 1000000 exec ...
0
votes
1answer
2k views

SQLPLUS withing shell script loops

Hello I am trying to run a loop and get the details of a project. I have these projects in my work space. How do I loop over the SQL code? #!/bin/bash workspace=$(sudo locate -r '/workspace$') ...
0
votes
1answer
307 views

dovecot mysql-connection error because of special charater in config

I successful set up my Server with froxlor, etc. but now I get errros with my mail delivery Agent because I use a '#' in my mysql-pw. I tried to escape it with a '\' but it doens't seem to work. :( ...
0
votes
2answers
2k views

How can I get sql queries to show in output file?

I tried executing set of queries from a shell script while capturing both input (SQL query) and output in the log file. But the input query is not displayed along with output. Only the outputs are ...
0
votes
1answer
27 views

Loop for's result in a variable for sql query

I have this part of my script for i in `cat ${RELLIST}` do for mr in `cat ${i}/DBA/install.list` do grep -i "'dba_" ${i}/DBA/sql/${mr}/*.tab 2> /dev/null | sed 's/^.*://' #grep -i ...
0
votes
0answers
18 views

checkbox to automated sql scripts run

I want to provide a menu in a shell script that offers a check list of SQL scripts to run. I actually need to execute the selected SQL scripts but it's about 20 of them and that make it hard to cover ...
0
votes
0answers
20 views

Disabling strict mode does not take effect from the config file

I am trying to disable the MySQL/MariaDB strict mode in the variable sql_mode. But it doesn´t work. My my.cnf in section [mysqld] got this line: sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" ...
0
votes
0answers
16 views

Oracle / sql : calculation one or more value within the same field

I want select statement to sum the amount of value 352+652+20+356 that come in the same filed without need PL/SQL . [{Name:"account:account_1"&Value:352&New:256&CreditLimit:0} ...
0
votes
1answer
51 views

From Mysql query output to retrieve files in the file system and rename the files

I have to call a SQL query from bash that outputs 1000 rows of two columns File_Path (Eg., /opt/files/dest/2.bin) Name_of_the_file (Eg., fax attachment.pdf, invoice.docx... yes, there are spaces). ...
0
votes
0answers
79 views

How to run multiple queries in a KSH script

I have a KSH script that has one SQL Query and generates and emails output of the query in HTML format. I want to change the script so that it has three SQL queries and the last query generates and ...
0
votes
0answers
43 views

sql db from cpanel into phpmyadmin takes forever

As titles states, I just cant import my database from cpanel, I used cpanel to export it but i also went in cpanel directly to phpyadmin to export. I want to import it on my new server , size is ...
0
votes
1answer
60 views

KSH script missinterpreting alias stored in SQL oracle DB

I have stored the path of my file in a table with as an alias (as the complete path was too long for the table's field). However, in my KSH script, when I am doing : nomtmp=`sqlplus -S bla/bla ...
0
votes
1answer
173 views

What is the format of the data that must be fed to the freetds tool bsqldb?

I need help figuring out how to input my data to bsqldb. I have been looking for a manual or some examples or tutorial but I cant find anything online beside its command line help. I am planning to ...
-2
votes
1answer
46 views

unix oracle connectivity [closed]

Operating system : Windows8.1 i use Linux ubuntu using vmware Today i have installed oracle database 11g release 2 in particular drive i want to access database via linux/ubuntu i able to ...
-2
votes
0answers
15 views

sql server and apche and lan access

I Have a sql server and phpmyadmin and Apache on a Ubuntu laptop 14.04 and ia have a mac i have ftp set up to upload files to the laptop www dir. but i want to make a php my on dream weaver with a ...