10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies
2. Shell Programming and Scripting
Hello
Just edited the entry to make it easier to understand what i want
How can i achieve this: GOAL:
read 2 field from a table with PSQL
result of this PSQL command is this
INSTALLEDLANG=$(su - postgres -c "psql -A -t -q -c -d ${DBNAME} -t -c 'SELECT code, iso_code from res_lang'")
... (0 Replies)
Discussion started by: winston6071
0 Replies
3. Shell Programming and Scripting
Hi All,
I have a file queries.txt as follows :
SELECT COLUMN1 FROM SCHEMA2.TABLE1 MINUS SELECT COLUMN1 FROM SCDEMA2.TABLE2;
SELECT COLUMN2 FROM SCHEMA2.TABLE1 MINUS SELECT COLUMN2 FROM SCDEMA2.TABLE2;
SELECT COLUMN3 FROM SCHEMA2.TABLE1 MINUS SELECT COLUMN3 FROM SCDEMA2.TABLE2;
SELECT... (2 Replies)
Discussion started by: SriRamKrish
2 Replies
4. Shell Programming and Scripting
Hi,
I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command.
Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns.
Xargs -I {} grep... (3 Replies)
Discussion started by: Diya123
3 Replies
5. UNIX for Dummies Questions & Answers
I need to connect a databas eusing sqlplus and i need to store the results of each query in separate file.
is it possible to achieve this usng single sqlplus?
i dont want to connect each time for each query.
thanks (3 Replies)
Discussion started by: pandeesh
3 Replies
6. UNIX for Advanced & Expert Users
Hello everyone,
It's my first week using unix and shell scripting. I tried creating a script that has a function that execute SQL query. my script looks something like this:
----------------------------------------------------
#!/bin/sh
tableName="myTable"
secondTable="secondTable"... (2 Replies)
Discussion started by: edlin_r
2 Replies
7. Shell Programming and Scripting
Hi Everyone,
When i finish running
# echo `psql -t -U root databaseA -c "select a, b from book"`;
i get the output
107275 | 14 107301 | 2 107446 | 6 107820 | 77 107929 | 101
Would like to have the result like:
107275 | 14
107301 | 2
107446 | 6
107820 | 77
107929 | 101 (7 Replies)
Discussion started by: jimmy_y
7 Replies
8. Shell Programming and Scripting
Hi folks,
I've been using grep -f file1 file2 to get lines that match a file1 line from file2. I'm now interested in getting the lines from file1 where there was no match in file2.
I believe the -v option will give me unmatched lines from file2, but I'm looking for unmatched lines from... (3 Replies)
Discussion started by: sanjuro
3 Replies
9. Shell Programming and Scripting
Hi guys,
i know how to run a single query using mysql embedded in a shell script as follows:
`mysql -umyuser -pmypass --host myhost database<<SQL
${query};
quit
SQL`
However, how would i be able to run several queries within the same connection?
The reason for this is i am creating... (3 Replies)
Discussion started by: muay_tb
3 Replies
10. Shell Programming and Scripting
Hi,
I new to Unix and scripting. Following is my requirement. Can someone tell me whether its possible or not. Also please let me know how to proceed further if this is possible.
List of queries are stored in a file. For example, I have to run a query like this:
Select * from &XYZ where... (0 Replies)
Discussion started by: simhasuri
0 Replies