Wednesday, February 15, 2012

Excel Import

Trying to import an excel file into SQL Server. For some reason, this
column is being considered Double(15) and when it imports, it's losing text
data. I'd like it to just be treated as any form of text and import
exactly. Right now all of the numeric ones go through but the hybrid ones
are blank. Is this possible?
KM
--
154+a
84+b
154
84
15
15
84Are you using a script to import or just the import wizard from SQL? If you
use the import wizard, are you predefining the fields before you import but
after you select the flat file source. (first screen but you need to scroll
down to the Advanced - Data source: - format each column)
If you have run through the import and failed, the table is already created
with these predefined fields and you will need to modify them to fit the dat
a.
The above assume you use the wizard (right click - database - choose Import)
--
Regards,
Jamie
"James" wrote:

> Trying to import an excel file into SQL Server. For some reason, this
> column is being considered Double(15) and when it imports, it's losing tex
t
> data. I'd like it to just be treated as any form of text and import
> exactly. Right now all of the numeric ones go through but the hybrid ones
> are blank. Is this possible?
> KM
> --
> 154+a
> 84+b
> 154
> 84
> 15
> 15
> 84
>
>|||These little scripts may be of relevance:
http://sqlblog.com/blogs/linchi_she.../>
he-day.aspx
Linchi
"James" wrote:

> Trying to import an excel file into SQL Server. For some reason, this
> column is being considered Double(15) and when it imports, it's losing tex
t
> data. I'd like it to just be treated as any form of text and import
> exactly. Right now all of the numeric ones go through but the hybrid ones
> are blank. Is this possible?
> KM
> --
> 154+a
> 84+b
> 154
> 84
> 15
> 15
> 84
>
>

No comments:

Post a Comment