Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I write te records of SQL table into mutiple csv file?

Status
Not open for further replies.

mimitan

Technical User
Dec 17, 2004
34
Hi,
I have a table named tblemployee in the sql2005 database MyCompany. I am trying to create a page that have a textbox which user can enter an integer 1-3 (number of csv file)and a button when clicked, it will connect to tblemployee table, obtain the number of records of the table and divide by the texbox integer, then write equal (when possible) number of records to each csv file. for example if tblemployee have 100 records, and the user enter 2 then the clicked button should write the tblemployee records to 2-(split) 50 records csv file. Or if the user enter 3 then it would produce 2--34 records csv files (34 because i useed math.ceiling function) and 1--32 records csv file. Can someone help me with this.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top