Search found 3 matches
- 14 Dec 2013 22:46
- Forum: DOS Batch Forum
- Topic: Read values from comma delimited file and generate sql
- Replies: 6
- Views: 5556
Re: Read values from comma delimited file and generate sql
The result is line-c+1.sql having the following content: select * from table1 where col1 = 'A' and col2 = '1' ; select * from table1 where col1 = 'B' and col2 = '2' ; select * from table1 where col1 = 'C' and col2 = '3' ; can I have the 3 files instead? # line1.sql select * from table1 where col1 = ...
- 13 Dec 2013 08:49
- Forum: DOS Batch Forum
- Topic: Read values from comma delimited file and generate sql
- Replies: 6
- Views: 5556
- 13 Dec 2013 02:51
- Forum: DOS Batch Forum
- Topic: Read values from comma delimited file and generate sql
- Replies: 6
- Views: 5556
Read values from comma delimited file and generate sql
I have a comma delimited input file param.txt: A,1 B,2 C,3 ...... I would like to create a batch file that: 1. read every lines of param.txt 2. and generate the sql like below for each line line1.sql: select * from table1 where col1 = 'A' and col2 = '1' ; line2.sql: select * from table1 where col1 =...