We help IT Professionals succeed at work.

data format for Sql server

zachvaldez
zachvaldez asked
on
when exporting my excel file to SQL server using Import/export tool I have product number column which displays as 7.0865E+11 formatted as general. I reformat it to number with 0 decimal places in Excel to display as  708650000000. when I export it it gets to sql server as null
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
How is the data brought in?
If importing, make sure to mark the column as a mdy.

In export, you have properly identify the column into which it is going.

Author

Commented:
It turns to Null

Author

Commented:
what's mdy?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Month day year.
I think when importing, you have make sure the column into which it is going is a datetime .......
If your are going through an import wizard, the characterization of data with the correct data type.

Author

Commented:

It's a UPC code that should display as 708650000000 and not

 7.0865E+11 and I don't why it displays that way when opening a csv file in Excel.


CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
ChNge the column display option, change it to text versus a number

Author

Commented:

If I change to text, it stays the same. format number change correctly

CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Product number would commonly be a text versus a numeric which the display is correct ....

How is the SQL defines the column whereas info?

Author

Commented:

I used text to columns and seems to be working

I used text to columns and seems to be working

Explore More ContentExplore courses, solutions, and other research materials related to this topic.