Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Ali T
Starting Member
22 Posts |
Posted - 2008-08-17 : 07:38:51
|
| Dear all;I have a text data file and I have imprted this file to SQL server 2005 as a table. the data that i have has got a date time column in (dmy) form.after importing the data into sql server 2005 the dates become crazy!...some of them maintain the form of (dmy) but the others change their form into (ymd) or (ydm). the data that I have contains about 5.5 million records(rows) and since i want to extract specific information from it according to the date of occurence this problem has lock my work and i am unable to extract the records that i want. as an example of my problem: the records that i have are from 1-1-2008 to 30-1-2008 but after improting them due to the change in date format some of my records show for instance 8-1-2013 or 8-1-2030 or other non-sense dates.I'll appreciate if you help me about this problem.RegardsAli T |
|
|
Ali T
Starting Member
22 Posts |
Posted - 2008-08-17 : 08:03:30
|
| to be more specific on 1-1-2008 the data is ok and it is in (dmy) formt. from 2-1-2008 to 12-1-2008 it becomes mdy and from 13-1-2008 to 30-1-2008 it becoms ymd. |
 |
|
|
savior faire
Posting Yak Master
194 Posts |
Posted - 2008-08-17 : 08:11:16
|
| Have you examined some of the input data to see if the input dates are consistent?Talk sense to a fool and he calls you foolish. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-17 : 08:36:37
|
| How are you importing the text file to sql? |
 |
|
|
Ali T
Starting Member
22 Posts |
Posted - 2008-08-17 : 08:49:34
|
quote: Originally posted by visakh16 How are you importing the text file to sql?
when i want to choose the source of data i choose the flat file. |
 |
|
|
Ali T
Starting Member
22 Posts |
Posted - 2008-08-17 : 08:50:57
|
quote: Originally posted by savior faire Have you examined some of the input data to see if the input dates are consistent?Talk sense to a fool and he calls you foolish.
yes i cheked data file and the dates in that were correct! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-17 : 09:00:18
|
quote: Originally posted by Ali T
quote: Originally posted by visakh16 How are you importing the text file to sql?
when i want to choose the source of data i choose the flat file.
or i guess its ssis.are you just dumping data as it is or applying some transformations in between? |
 |
|
|
Ali T
Starting Member
22 Posts |
Posted - 2008-08-17 : 09:25:44
|
quote: Originally posted by visakh16
quote: Originally posted by Ali T
quote: Originally posted by visakh16 How are you importing the text file to sql?
when i want to choose the source of data i choose the flat file.
or i guess its ssis.are you just dumping data as it is or applying some transformations in between?
no i think no transformation happens during the transfer i just import the data into a table in Sql server. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-17 : 12:35:04
|
| and have you checked what your destination field datatype is? is it datetime or character based? |
 |
|
|
|
|
|