June 3, 2008 at 12:35 pm
Hi,
I am using SQL Server 2000 to import data from a text file using the DTS wizard. I have one column that is of type date in the DB table. The field coming from the text file could be a date or 'UNDEF'. Can someone let me know how to validate (using rules or stored procedure, etc...) that the incoming data is a date and if not, set the field to NULL.
In that same line, if my DB table column is of type INT, how do I validate the incoming data from the text file and insert a NULL if not an INT.
Thanks,
David
June 3, 2008 at 12:42 pm
I know how to do that in SSIS and in T-SQL, but not in DTS. Maybe try the SQL 2000 Forums on this page. You might have more luck there. Sorry.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
June 8, 2008 at 5:19 pm
My DTS is very rusty, but I think in the ActiveScript within the transform you could build in validation. But that comes at a price (performance...)
As GSquared suggests, your best bet is most probably the DTS forum
~PD
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply