LittlBUGer
Programmer
Hello. I've recently added the ability for a web tool I'm working on for the user to upload an Excel file to the server and than have the data within be inserted into our SQL Server 2000 database. I have it working with a more bare-bones Excel file in which it uses the SqlBulkCopy statement to select all data from the Excel file into a temp. table and then insert the data from the temp table into the database. The issue is with the Excel file. The template we require has gibberish, or more importantly, text that SQL cannot interpret (nor shouldn't) and thus cannot put into the database on the first 5 rows of the file. Right now, the basic SQL query is just:
Is there a way to select everything after the first 5 rows within the Excel file, or just to skip the top 5 rows? Something like (obviously non working syntax):
Any suggestions? Thanks.
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein
Code:
SELECT * FROM blah
Is there a way to select everything after the first 5 rows within the Excel file, or just to skip the top 5 rows? Something like (obviously non working syntax):
Code:
SELECT NOT TOP 5 * FROM blah
OR
SELECT * FROM blah WHERE NOT TOP 5 *
Any suggestions? Thanks.
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein