I am importing data from an excel worksheet in to a sql table,
one of the columns in the table is set to nvarchar(50), the data i am importing are barcodes, but the problem i am having is the column is changing the data
for example the number "5900397732209" is converted to "5.9004e+012" this is only happening when the data is imported.
if i save the barcode direct from my software it shows in the correct format in the table.
anyone know why this is.

Excel is formatting the number. Open excel and set the desired format for those columns.

First select the column:

2c3a3bd75a4df2f9283ee563f1501fb8

Next set the formatting:

c536ebac45fe03bdcf1984565daa2667

Click okay and you are finished!

791f2d76ccfad3d9ab0d7bd1870f9663

hi,thanks for the reply
I already formatted the cells on the excel sheet to the number format with no decimal spaces but it was still the same, initially when you import the data it is set as "float" in sql at this point the number is in full but as soon as i change it to nvarchar it changes it,

After a quick google session using keywords I found this article. Maybe it is what you are looking for! :)

tried many things , but in the end i just copied and pasted the data into excel and it seems to be fine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.