![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a txt file that contains the date in a string format. I import this in directly and it comes up a vchar instead of a date field. I need to convert it to a date so I can do an index on it. I don't know if it is possible to do in the DTS or if I should leave it how it is and then use a conversion in the view. I see different things about VB on the board but I don't yet understand how to implement that either in the DTS. I see that I can do a Cdate in VB but how I put that into the correct column and have everything else come into the table is beyond me at this point. Any advice would be gladly appreciated. Thanks, -- |
#3
| |||
| |||
|
|
What happens when you try to simply pump the "Text" Date into a proper DateTime field? There is no cute SQL that you can perform on the source before it gets to the transformations because text files are about as flexible as me in a yoga class. You would have to perform manipulation if the above does not work in an Active Script transform Have a look here Formatting Character Data into Datetime fields (http://www.sqldts.com/default.aspx?249) -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.SQLIS.com - You thought DTS was good. here we show you the new stuff. www.konesans.com - Consultancy from the people who know "Cazian" <Cazian (AT) discussions (DOT) microsoft.com> wrote in message news:9F730F80-2E85-4526-B432-6D18AC784203 (AT) microsoft (DOT) com... I have a txt file that contains the date in a string format. I import this in directly and it comes up a vchar instead of a date field. I need to convert it to a date so I can do an index on it. I don't know if it is possible to do in the DTS or if I should leave it how it is and then use a conversion in the view. I see different things about VB on the board but I don't yet understand how to implement that either in the DTS. I see that I can do a Cdate in VB but how I put that into the correct column and have everything else come into the table is beyond me at this point. Any advice would be gladly appreciated. Thanks, -- |
![]() |
| Thread Tools | |
| Display Modes | |
| |