Click to See Complete Forum and Search --> : Help writing a perl script


alidar777
07-03-2006, 11:40 AM
Hi,
I want to write a perl script or any other script which will do following:
I have around 30,000 numiric values in my excel column. For these valuses i need to write a script which will read
values from the column and append them to an sql IN(Clause) 200 max in one IN.

For Example:
Excel Data
Col1
1234566
1234666
1234766
.
.
.Up to 30,000 rows
9999999

SQL: select ColVal1, ColVal2 from tablename where id in(1234566,1234666) [200 Max].

after i run the sql the results i need to send to Excel.

I ahve no idea how i can do it some one please help

--Thanks

CyCo
07-03-2006, 06:16 PM
I can refer you to an alpha version of DBD::Excel (http://search.cpan.org/~kwitknr/DBD-Excel-0.06/Excel.pm). Sounds as if that module (along with supportive modules - Spreadsheet::ParseExcel, Spreadsheet::WriteExcel, SQL::Statement and DBI - ) may do the trick. Do read the documentation or search deeper at cpan.