all groups > sql server new users > march 2007 >
You're in the

sql server new users

group:

import question


import question HX
3/30/2007 9:42:41 AM
sql server new users:
I have to import a particular spreadsheet monthly (sql 2000, using
enterprise manager). The key field can have a value like 89976, which
appears to be just a number, though it is not calculated, OR it can have a
value like 5X6D4.

I have tried importing to a new table, importing to an existing table,
saving the key column as text in Excel (for good measure), and setting the
import of that field to any variety of field types. But I just can't seem
to get ALL the values to import! I either get all the number-looking values
(89976) and the values that were letter/number mixed (5X6D4) import as NULL
or vice versa!

How can I get ALL the values to import correctly?

Re: import question TheSQLGuru
4/1/2007 6:36:17 PM
How are you doing the import?

Have you selected all of the key cells in excel and formatting as Text?

--
TheSQLGuru
President
Indicium Resources, Inc.

[quoted text, click to view]

Re: import question HX
4/2/2007 2:44:09 PM
Yes, I have selected all the cells and formatted them as text (for the key).

Then I am using Enterprise Manager's Import function to import from Excel to
SQL 2000.

[quoted text, click to view]

Re: import question TheSQLGuru
4/3/2007 9:55:49 AM
Try using OPENDATASOURCE or OPENROWSET. These could allow you to avoid
having to manually import the data too as an added benefit.

--
TheSQLGuru
President
Indicium Resources, Inc.

[quoted text, click to view]

AddThis Social Bookmark Button