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
 Transact-SQL (2005)
 Import Data from Excel to SQL

Author  Topic 

infodemers
Posting Yak Master

183 Posts

Posted - 2010-04-08 : 11:42:13
Hi,

Using this query, I do not get the column A from my Excel file.
Any Idea why?

Select * from openquery(ExcelLinkedServer, 'select * from [Sheet1$]')

Thanks!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-08 : 11:43:25
do you have such a column in your Sheet1?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

infodemers
Posting Yak Master

183 Posts

Posted - 2010-04-08 : 12:43:22
Hi visakh16,

Yes i do ...Column A to L and I only get the data from coulumn B to L..

Bizarre , isn't it?

quote:
[i]Originally posted by visakh16[
/i]

do you have such a column in your Sheet1?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-08 : 12:46:24
whats the data you've in it? what type i mean

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

DBA in the making
Aged Yak Warrior

638 Posts

Posted - 2010-04-08 : 12:46:26
What is in Column A, and what do you get?

There are 10 types of people in the world, those that understand binary, and those that don't.
Go to Top of Page

infodemers
Posting Yak Master

183 Posts

Posted - 2010-04-08 : 13:30:47
In Column A I have text only.
If I insert a blank column (A) then my range of data becomes B to M instead of A to L, it works.
quote:
Originally posted by DBA in the making

What is in Column A, and what do you get?

There are 10 types of people in the world, those that understand binary, and those that don't.

Go to Top of Page

DBA in the making
Aged Yak Warrior

638 Posts

Posted - 2010-04-08 : 13:33:36
quote:
Originally posted by infodemers

In Column A I have text only.
If I insert a blank column (A) then my range of data becomes B to M instead of A to L, it works.

Well... That's strange.

There are 10 types of people in the world, those that understand binary, and those that don't.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-04-09 : 02:51:11
Have you tried OPENROWSET with HDR property?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -