For i=0 to 5
do
Get row of ouput from isql
$lname$i=<extract first column>
$fname$i=<extract second column>
Go to next row of output from isql
done
These variables i use to query database in later part of the script.
Is it possible? I have done it in ksh but am very new to perl.I know how to open a file,write query to it and execute using isql through perl. I just dont know how to implement the above pseudo code.
Can somebody please help??Thanks..
I'm afraid i have no idea what DBI is but i guess its sort of extension to perl that i need to install. I cant be sure that i can get it installed in customer place. But normal isql seems to solve my problem.
After getting these data i need to create a view on sybase server and then bcp out the data. I have written the perl script for it and it is working fine but for a fixed number of inputs.
The fname,lname form part of the WHERE clause of the query. How can i write SQL statement to create view with variable number of conditions in WHERE clause
CREATE VIEW cust_view AS select * from customer where fname='AAAA' AND fname='BBBB' AND ...
How do i handle this assuming i have all the 'fnames' in an array and so know the count of array elements.??
In reply to how to parse output from isql utility by reuben12
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |