Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Shanah
Starting Member
3 Posts |
Posted - 2011-07-27 : 16:22:08
|
| I am new to writing freehand sql in BO/Toad and looking for a way to do the following: Note: I can only query against 999 records at a time, with that being said a lot of data that I query contains well over 2k records. What i would like to do is set up a file to retrieve from excel or csv the first 999 records (i.e. loan number), retrieve my query data and export to an excel file. I don't mind if i export to a csv file but my last column is a comment field and I'm worried about it truncating data (not sure if it will, but seems as though it might pose an issue)... then I would like for it to proceed to the rows 1000-1998, export and/or append, and repeat until I read the end of my file. Or... If I can't append within the same worksheet file, can I export to different sheet names within the same file? Any suggestions or recommendations would be great! Thank you |
|
|
Ghanta
Yak Posting Veteran
96 Posts |
Posted - 2011-07-27 : 16:25:53
|
| Are you going to use SQL Server? |
 |
|
|
Shanah
Starting Member
3 Posts |
Posted - 2011-07-27 : 16:30:13
|
| Hi Ghanta,yes I will be using SQL server. |
 |
|
|
Ghanta
Yak Posting Veteran
96 Posts |
Posted - 2011-07-27 : 16:36:47
|
quote: Originally posted by Shanah Hi Ghanta,yes I will be using SQL server.
In that case load the data into a table.. have an identity field for row number and either use SSIS to export or use bcp export with a while loop or cursor to do export... do not know how big is ur comments column, but it should be ok. |
 |
|
|
Shanah
Starting Member
3 Posts |
Posted - 2011-07-27 : 16:41:47
|
| I am new to writing sql code, other than just generic select statments, so i'm not sure how to even begin to code this. Any assistance would be appreciated. |
 |
|
|
Ghanta
Yak Posting Veteran
96 Posts |
|
|
|
|
|
|
|