Help.
SQL Server 2005
I imported an Excel spreadsheet to a table using the Import tool.
One of the fields in the spreadsheet was phone number. No big deal.
I looked at the imported table, and the phone number field appears correctly, eg) 5055551234
However, I then had to copy the information in the import table to another table. However, in the target table, the phone number is now all messed up and appears as:
7.19549e+009
The import table phone number field is a varchar. However, in the initial import process, it creates the field as a float, which I then changed to a varchar. The target table phone field is also a varchar.
I have done this import process a zillion times before, and I have never seen this. In an attempt to fix the problem, I created a cursor to loop thru the import table (where the phone # field appears correctly) and update the target table. However, a print statement of the cursor's
phone variable shows it as 7.19549e+009.
That is, if I run a SELECT on the import table the phone # appears normal. If I select then print the phone field with a cursor, it shows up as 7.19549e+009.
This really doesn't make sense to me.
Any ideas???
Thanks
SQL Server 2005
I imported an Excel spreadsheet to a table using the Import tool.
One of the fields in the spreadsheet was phone number. No big deal.
I looked at the imported table, and the phone number field appears correctly, eg) 5055551234
However, I then had to copy the information in the import table to another table. However, in the target table, the phone number is now all messed up and appears as:
7.19549e+009
The import table phone number field is a varchar. However, in the initial import process, it creates the field as a float, which I then changed to a varchar. The target table phone field is also a varchar.
I have done this import process a zillion times before, and I have never seen this. In an attempt to fix the problem, I created a cursor to loop thru the import table (where the phone # field appears correctly) and update the target table. However, a print statement of the cursor's
phone variable shows it as 7.19549e+009.
That is, if I run a SELECT on the import table the phone # appears normal. If I select then print the phone field with a cursor, it shows up as 7.19549e+009.
This really doesn't make sense to me.
Any ideas???
Thanks