-2

I am trying to call a stored procedure with Time variable as in parameter. But whenever i try to call the procedure i m getting error as:

db2 'call PASS_FAIL_CHECKDATE('2014-01-21','13:42:25','CSS1',Null,'4500096651','10',Null)'
SQL0104N  An unexpected token ":42" was found following "CKDATE(2014-01-21,
13".  Expected tokens may include:  "+".  SQLSTATE=42601

My Procedures input parameter are :

PASS_fail_checkdate (in post_date date,in post_time time,in destplant varchar(4), in destloc varchar(4), in transnum varchar(10), in translineitemnum varchar(6), in inboundconsignment varchar(35))

I am not sure if my declaration for time variable is correct in procedure or if i am calling the time variable correctly in the procedure.

Please give me suggestions on the same.

mustaccio
  • 18,234
  • 16
  • 48
  • 57
Anym
  • 1
  • 1
  • 3

1 Answers1

0

As already offered, in words, try the following example as a revision to what was noted in the OP as tried already but failing; i.e. change to use double-quote vs the apostrophe, specified as the delimiter for the DB2 SQL statement string:

db2 "call PASS_FAIL_CHECKDATE('2014-01-21','13:42:25','CSS1',Null,'4500096651','10',Null)"
CRPence
  • 1,259
  • 7
  • 12