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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS SQL Server DTS Import 1

Status
Not open for further replies.

sa0309

Programmer
Apr 5, 2010
45
US
I'm attempting to import a text file that can contain negative numbers into a SQL Server 2000 table via a DTS package.

My field is defined as numeric(9,2). The source data is formatted 123.99- Is there a way load it with the negative sign being at the end.

I know the load works when the negative sign is in front, -123.99. However; I have little control on the formatting because my source file is from an outside vendor.

Any help is appreciated.
 
only thing I can think of is a script to move the - to the front.
 
MDXer - kind of what I was thinking also.

Thanks
 
I am probably too late on this response, but...

When I load data via DTS into a SQL table, I load it into all CHAR columns. This becomes my staging table, and I can guarantee that all data gets loaded, valid or not. Using this approach, you could load the trailing sign into its own column and use it to determine the numeric load.

Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top