Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing from an Excel spreadsheet - numbers/text

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
We're attempting to import data from an Excel spreadsheet into a SQL Server table. When we try to do this we appear to be losing numeric data from one of the columns. The said column in the Excel spreadsheet contains both text strings and numbers (i.e. 'HJSHGK' and 90897). When we run the import of data through SQL Server Enterprise Manager we get the String data but all entries that were previously numeric were NULL in the resultant SQL Server table. We've tried formatting the column in Excel such that the numbers are recognised as text (using 'Format Column') but this still gives us the same result.
I'm guessing we're missing the obvious here - could someone pinpoint what it is ?
Thanks in advance
Steve
 
We've managed to do this by saving the Excel spreadsheet as a Text (Tab Delimited) file and running the import.
Is there a more direct route ? (Excel directly into SQL Server)
If we put a single quote mark in front of the numeric column entries, these are then fed through as required (into the CHAR column type).
Any pointers would be appreciated.
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top