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)
 Strange Problem while Reading records..

Author  Topic 

imp0steur
Starting Member

2 Posts

Posted - 2007-11-01 : 12:00:08
Hello all,

I have few data in excel files .. I have to export the data to an sql server database ..

I tried using and import/export wizard from the sql server .. the problem is :

My excel has a field called PCode it contains alphanumeric data .. the rows which has alphanumeric data return "" where as if the Pcode is only numeric 4546 it takes it ..

Here is the structure of the Target Sql Server Table



and here is the Excel file http://www.zuhaib.in/test.xls

Can u figure out what am I missing?


imp0steur a.k.a { Zuhaiß }™
http://www.Zuhaib.in/
http://www.Igniteds.net/

X002548
Not Just a Number

15586 Posts

Posted - 2007-11-01 : 13:16:18
Try importing the excel to a staging table.

Are you sure you are using 2005?

Sounds like 2000



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

imp0steur
Starting Member

2 Posts

Posted - 2007-11-02 : 11:56:31
Hi,
yes its sql server 2000 .. but there is no problem in inserting records ..
I created a program that will read records from the excel file and then insert into the table one by one .. I found that the problem is while reading the data from the excel files .. the column containing characters returns as empty strings ..

Thankz,

imp0steur a.k.a { Zuhaiß }™
http://www.Zuhaib.in/
http://www.Igniteds.net/
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-03 : 02:26:10
Did you try this?
http://sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

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

- Advertisement -