Search Results

Search: Posts Made By: Kabira Speaking
8,020
Posted By Kabira Speaking
Able to print the query in desired format
I am able to generate the queries as desired. But I don't know how to execute them from inside the awk block?
8,020
Posted By Kabira Speaking
Back to Square One
Thanks Klashxx for instant replies.

I changed the script to look like this.

awk '{
nbr=split($0,arr,",")
for(ix=1;ix<=nbr;ix++){
print "db2 \"INSERT INTO...
8,020
Posted By Kabira Speaking
Newbie to Unix
I tried replacing 'awk' with 'gawk' and I get, gawk: not found. Could you please tell me what is wrong with the script I had written the first time.
awk '{ nbr=split($2,arr,","); ...
8,020
Posted By Kabira Speaking
Tried but with no luck
I changed the query to this

awk '{print "db2 \"INSERT INTO TABLE_NAME (PRODUCT_CODE) values ("$1",) where NOT EXISTS (select * from TABLE_NAME where PRODUCT_CODE=("$1")\""}' RS=','...
8,020
Posted By Kabira Speaking
Insert query with shell variable with AWK
Hi,
I'm a first timer with Unix so pardon my ignorance.
I'm trying to read a comma separated file from the same folder where the script is and insert the value in a DB2 table.
I'm using AWK for...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy