we are using Parallel, Windows, Sql server 2005
we are getting like this in Flat files
7/6/2004 5:00:00 AM
8/15/2005 4:59:00 AM
11/21/2005 4:22:22 AM
Target is sql server using datatype TIMESTAMP.
need to be converting into
2004-07-06 05:00:00.000
2005-08-15 04:59:00:000
2005-11-21 04:22:22:000
if any one have idea about this , please could let me know.
Thanks
ra9
Timestamp conversion in SQL Server
Moderators: chulett, rschirm, roy
Did you try doing it normally? Did you face any errors while loading the data as it is? All you need to do is set the datatype to Timestamp with a scale of 3. Try doing that and see if it works. If it doesnt, then post the error message so that it will be easier for us to answer.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
We do need some more information to answer this
Hi,
I think 'lstsaur' is right that SQL Server 2005 is not directly supported yet, but the ODBC driver may work provided you have the most recent MDAC loaded (though this is speculation on my part).
If the other suggestion made ahead of my note here don't work for you, try using a user defined sequel that contains the key term 'COLLATE DATABASE_DEFAULT' for the date field after performing a CAST on the field name. Something similar to CAST(fieldname as varchar(20)). Bear in mind, I'm pulling this off the top of my head and I don't know if there needs to be any modification for 2005 or not. Hit the online books for the SQL side of it.
Overall, I agree with the others that we really need more information about your job to be able to truly help.
Bestest,
I think 'lstsaur' is right that SQL Server 2005 is not directly supported yet, but the ODBC driver may work provided you have the most recent MDAC loaded (though this is speculation on my part).
If the other suggestion made ahead of my note here don't work for you, try using a user defined sequel that contains the key term 'COLLATE DATABASE_DEFAULT' for the date field after performing a CAST on the field name. Something similar to CAST(fieldname as varchar(20)). Bear in mind, I'm pulling this off the top of my head and I don't know if there needs to be any modification for 2005 or not. Hit the online books for the SQL side of it.
Overall, I agree with the others that we really need more information about your job to be able to truly help.
Bestest,
Bestest!
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
Re: Timestamp conversion in SQL Server
In my case I have to insert date "8/15/2005 4:59:00 AM "from XML filera9 wrote:we are using Parallel, Windows, Sql server 2005
we are getting like this in Flat files
7/6/2004 5:00:00 AM
8/15/2005 4:59:00 AM
11/21/2005 4:22:22 AM
Target is sql server using datatype TIMESTAMP.
need to be converting into
2004-07-06 05:00:00.000
2005-08-15 04:59:00:000
2005-11-21 04:22:22:000
if any one have idea about this , please could let me know.
Thanks
ra9
same into the Sql server 2005
Input sqltype varchar---------------> output Timestamp