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.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 First row load?

Author  Topic 

Ali Chadorbaf
Starting Member

44 Posts

Posted - 2007-09-29 : 18:02:07
Hi,
Any way to read/load only the first row of a flat or excel file?

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-29 : 19:10:05
select top 1 *
from openrowset(<provider info here>)


_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

Ali Chadorbaf
Starting Member

44 Posts

Posted - 2007-10-03 : 18:01:33
quote:
Originally posted by spirit1

select top 1 *
from openrowset(<provider info here>)
_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com



Looks clean; however, where should I put this statement?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-10-03 : 22:37:55
Open new query in ssms and run the statement there.
Go to Top of Page
   

- Advertisement -