[resolved] Update / Insert data in MSSQL Server

One Star

[resolved] Update / Insert data in MSSQL Server

Hi,
I try to insert or update some datas in my MSSQL Server.
I have two Date, one for the insert, and the other for the update.
I check the use field option to user this.
But i have some errors.
Conversion failed when converting date and/or time from character string.
Conversion failed when converting date and/or time from character string.
Can you help me ?
Regards,
Yozol
Moderator

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
Conversion failed when converting date and/or time from character string

It seems your string data contains invalid date data
What's your input data datatype? "Date" or "DateTime"? Could you please show us your tMap setting screenshot?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
Here a screenshot of my tmap,
Regards,
Yozol
Moderator

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
Did you set data type as "Date " or "DateTime" for your tMSSQLOutput schema setting?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
It's DATETIME, but it change nothing if i select Date
Regards,
Yozol
Moderator

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
Could you please use tLogRow instead of tMSSQLOutput to see if there is any error printed on console?
tMSSQLInput-->tMap-->tLogrow
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
There is no error in the console
1||Billet simple CP||29-12-2014|29-12-2014|TEST
2||Billet simple expo||29-12-2014|29-12-2014|TEST
3||Billet jumelé||29-12-2014|29-12-2014|TEST
4||Forfait||29-12-2014|29-12-2014|TEST
Regards,
Yozol
Moderator

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
Have you tried to use option "Insert or Update" in tMSSQLOutput?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
Same errors with "Insert or Update" in tMSSQLOutput.
Can it be a problem of Date Format "dd-MM-YYYY" instead of i don't know the format of DateTime but in my database datetime look like that : 2014-12-23 17:25:44.053
Regards,
Yozol
One Star

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
When i uncheck  the Use Field Options it works :
But i don't know why. Is there something to do for the Identy on insert ?
Regards,
Yozol
Moderator

Re: [resolved] Update / Insert data in MSSQL Server

Hi,
It is probably caused by your data type. The data 2014-12-23 17:25:44.053 should be:yyyy-MM-dd HH:mm:ss.aaa.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.