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!

help needed on loading simple data to table

Status
Not open for further replies.

treviboy

Programmer
Dec 18, 2006
70
US
hi,
I am using DTS to load some data from an excel spreadsheet into a table that has some fields defined at "tiny ints" and /or small ints.. Anyway, I tried to run my package after I set up the input as an Excel spreadsheet.It did not like the fields that were defined as small ints.

I then went into Access and defined a table with , what I thought were appropriate field definitions ( I defined some as integers and then "byte" or simply "short integer". I exported that to a comma-delim file and it didnt like that either - same errors.
I think I've tried it all - and NOTHING works.

The error messages I get when I run the package telling me that I am trying to load a string into a number - when that is not true. HOw do I define the input on those? I have looked at the mapping and it looks very good. Please - any suggestions would be greatly appreciated. Thanks much.
 
Load the data into a temp table setup with varchar data types. Then load into the production table converting the data from varchar to number using the CONVERT() function.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Ok. I'll create a stored procedure and insert the new values into the table - that's what you mean right?
thanks. I'll give it a try.
 
Yes, that's correct.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top