January 17, 2007 at 2:25 pm
I have aDTS package which loads data from a .dat file to a sql table. Now the sql table where it loads the data has a primary key on say column1, where column1 has some blank/null data in the .dat. Asd a result when exceuting the DTS teh job fail saying null data where its notnullable for column1. Is there anyway that i can exclude the nullable rows and insert the rows into the sql table where column1 is notnullable . Any ideas or thoughts on this will be greatly appreciated. I read somehwre VBscripting can take care of this but since i havent worked on it if anyone has similar code that would be agreat help.
TIA
January 17, 2007 at 2:30 pm
You could first load into a staging table that allows null, then in your DTS have a 2nd step that does:
INSERT INTO REAL_TABLE SELECT * FROM STAGING_TABLE where COLUMN1 is not NULL
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply