on 06-04-2015 10:44 AM
While inserting client data using client exchange step in main fetch I am using sql as back end.
The sql query is :
<<local lastUpdate=<<if <<eq <<lastUpdate format="%Y">> "0000">>
"<<database.tempdate>>"
else
"<<lastUpdate>>"
>>
>>
INSERT INTO SycloExchangeTable
VALUES
('<<object.CustId>>','<<user.agentryID>>','<<server.serialNumber>>','<<lastUpdate format="%Y-%m-%d %H:%M:%S">>',NULL)
when I click on transmit I got this error
2015 06 04 14:56:29#+0530#ERROR#com.sap.mobile.platform.server.agentry.console##anonymous#Agentry Runtime Worker Thread###Exception: 14:56:29 06/04/2015 : 16 (SQLBEException), SQLQueryError (Fetch "MainFetch" ClientExchange "InsertExchangeStep", 3: SA_DBMS_API_Error, DB Code: 241, DB Text:22007 [Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting date and/or time from character string., ), query.cpp#145:SQLQuery::run |
Please help me in resolve the error
If your last update is not populated you will get an invalid date string (1-1-0000 I believe). That is why there is the logic at the top to check and create the local lastupdate value which will be defaulted to a valid tempdate if not set.
Your insert step should reference <<local.lastUpdate>> instead of the <<lastUpdate with the format parameter. You also do not need the single quotes around <<local.lastUpdate>> as the returned value will automatically include the single quotes.
--Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.