11-02-2005
use -x option
For those of you who are interested.
Use the command line option -x to suppress printing of column headers and feedback from the SQL engine other than the desired data output.
Courtesy of IBM web site. More information can be found here.
DB2 - UDB command line options
Jerardfjay
10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi there,
I am trying to write a shell script as root on AIX 5.3 where I change user to db2inst1, connect to our db2 database, run a sql select query and export the result of the query to a file.
The code I have so far is as follows:-
#!/usr/bin/ksh
su - db2inst1 -c "db2 connect to... (0 Replies)
Discussion started by: candlino
0 Replies
3. UNIX for Dummies Questions & Answers
hi,
i am a new user in unix..and we have unix db2. i want to capture the no. of rows updated by a update db2 sql statement and redirect into a log file.
I've seen db2 -m...but not sure how the syntax should be. The update sql that I'm going to run is from a file...
Can you please share... (1 Reply)
Discussion started by: j_rymbei
1 Replies
4. Shell Programming and Scripting
This is for an Oracle journal import. I was using a pl/sql package and oracle API's. Oracle added invoker rights to their API's and now my package won't run. I didn't want to use their API's anyway. The only reason i was using pl/sql and the API's (just a package) was to utilize a cursor. How... (2 Replies)
Discussion started by: lmu
2 Replies
5. Shell Programming and Scripting
Hi All,
Please help me out in executing the following db2 querry in unix
db2 "select AP_RQ_ACQ_INST_ID || ',' || txn_classifier || ',' || AP_RS_RESP_CD || ',' || (count(*) AS COUNT1) || ',' || (SUM(AP_RQ_TXN_AMT) AS TOTAL_AMT) from TXN_RECORD where
CREATE_TS > '2010-11-22 11:00:00.008645' ... (1 Reply)
Discussion started by: dudd9
1 Replies
6. Shell Programming and Scripting
Dear All,
I have a data file input.csv like below. (Only five column shown here for example.)
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
3,2,4,5,6
5,3,5,5,6
From this I want the below output
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
where the second column... (4 Replies)
Discussion started by: ks_reddy
4 Replies
7. Shell Programming and Scripting
Hi,
This may not be the right forum but i am hoping someone knows an answer to this.
I have to capture rows for a column that was deleted. How can i do that without having to write a select query?
delete from myschema.mytable where currentdatetimestamp > columnDate
this should delete 5... (4 Replies)
Discussion started by: jakSun8
4 Replies
8. Shell Programming and Scripting
Dear All,
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies
9. Shell Programming and Scripting
Hello
I want to collapse a file with multiple rows into consolidated lines of entries based on selected columns as the 'key'.
Example:
1 2 3 Abc def ghi
1 2 3 jkl mno p qrts
6 9 0 mno def Abc
7 8 4 Abc mno mno abc
7 8 9 mno mno abc
7 8 9 mno j k
So if columns 1, 2 and 3 are... (6 Replies)
Discussion started by: linuxlearner123
6 Replies
10. Programming
Hi Team
I am using DB2 artisan tool and struck to handle multi values present in columns that are comma(,) separated. I want to convert those column values in separate rows .
For example :
Column 1 Column2
Jan,Feb Hold,Sell,Buy
Expected Result
Column1 ... (3 Replies)
Discussion started by: Perlbaby
3 Replies