Re: Workflow Command - Syntax Question (101 Views)
Reply
Regular Advisor
pepdwill
Posts: 206
Registered: ‎07-12-2012
Message 1 of 2 (118 Views)

Workflow Command - Syntax Question

Hopefully this is a quick answer for somebody.

 

Am trying to set a field in a workflow command, but having issues with the syntax.

 

ksc_store REQD.P.P_DATEFIELD = to_char('[SYS.DATE]','YYYY-MM-DD HH24:MI:SS')

 


Can anyone point out what I'm doing wrong?

Please use plain text.
Honored Contributor
Utkarsh_Mishra
Posts: 682
Registered: ‎07-13-2010
Message 2 of 2 (101 Views)

Re: Workflow Command - Syntax Question

[ Edited ]

You are using incorrect synatx in the command, as "to_char" is Oracle function and it does not work this way, this is not the right way to do it. Probaly if you want to store the current time and date then you can use this

 

ksc_store REQD.P.P_DATEFIELD = "[SYS.TIME_STAMP]", "[SYS.TIME_STAMP]"

 

[SYS.TIME_STAMP] - Date format is 'MM-DD-YYYY HH24:MI:SS'

 

 

----------------------------------------------------------------------------------------------

 

If you still want to use date in other format then use this in the command:

 

ksc_itg_run_sql QUERY_STRING="select to_char('sysdate','YYYY-MM-DD HH24:MI:SS')from dual"
ksc_set P_VALUE="[SQL_OUTPUT]"
ksc_itg_run_sql QUERY_STRING="select to_char('sysdate','YYYY-MM-DD HH24:MI:SS')from dual"

ksc_set VP_VALUE ="[SQL_OUTPUT]"
ksc_store REQD.P.P_DATEFIELD = "[P_VALUE]" ,"[VP_VALUE ]"

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation