Avatar of zachvaldez
zachvaldez
Flag for United States of America asked on

data format for Sql server

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
Microsoft SQL Server

Avatar of undefined
Last Comment
zachvaldez

8/22/2022 - Mon
arnold

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.
zachvaldez

ASKER
It turns to Null
zachvaldez

ASKER
what's mdy?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
arnold

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.
zachvaldez

ASKER

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.


arnold

ChNge the column display option, change it to text versus a number
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
zachvaldez

ASKER

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

arnold

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

How is the SQL defines the column whereas info?
zachvaldez

ASKER

I used text to columns and seems to be working

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
zachvaldez

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.