SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Null Values shows while importing from excel to Sql


Null Values shows while importing from excel to Sql

Author
Message
avdhut.k
avdhut.k
SSC Veteran
SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)

Group: General Forum Members
Points: 221 Visits: 266
Hi,
I have Excel File with following coloumn and sample data.

example,

No TranRefNo
1 1111
2 2222
3 3333
4 4444
5 5555
6 6666
7 7777
8 8888
9 alstsh1234
10 absgya1234


The DataType of TranRefNo is General in Excel
Problem is,
When I import the Excel File in SQL values of TranRefNo till No 8 imports correctly,
but, for 9 and 10 where TranRefNo is alphanumeric Values it shows as NULL Values.

Please give me solution,i need this for urgent requirement.
I had also tried in SSIS but same problems occurs.

Is there other alternative in SSIS.

Thanks in Advance!
Tava
Tava
SSC Veteran
SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)

Group: General Forum Members
Points: 286 Visits: 777
avdhut.k (11/7/2012)
Hi,
I have Excel File with following coloumn and sample data.

example,

No TranRefNo
1 1111
2 2222
3 3333
4 4444
5 5555
6 6666
7 7777
8 8888
9 alstsh1234
10 absgya1234


The DataType of TranRefNo is General in Excel
Problem is,
When I import the Excel File in SQL values of TranRefNo till No 8 imports correctly,
but, for 9 and 10 where TranRefNo is alphanumeric Values it shows as NULL Values.

Please give me solution,i need this for urgent requirement.
I had also tried in SSIS but same problems occurs.

Is there other alternative in SSIS.

Thanks in Advance!



TransRefNo has to be TEXT category not GENERAL (use TEXT TO COLUMN for most accurate result) & database table will have to be VARCHAR(X)

That should fix it.
avdhut.k
avdhut.k
SSC Veteran
SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)

Group: General Forum Members
Points: 221 Visits: 266
Thanks!
Tava
Tava
SSC Veteran
SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)SSC Veteran (286 reputation)

Group: General Forum Members
Points: 286 Visits: 777
No problem, hope it all worked
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search