0 Replies Latest reply: Oct 25, 2013 12:12 PM by user464965 RSS

    SQLEXEC Format in the Table Spec of an Extract?


      I'm trying to demonstrate to myself how to place tokens in a trail file using an SQLEXEC, and I'm having issues even with a very simple example.  I have the following table spec in my params file:


      table my_schema.*, SQLEXEC ( ID myResults, QUERY "select sysdate as fooDate from dual " ), TOKENS (TKFOO=@GETVAL(myResults.fooDate));


      ... the extract will start up fine with the spec above, but it ABENDS as soon as I make any data changes in the my_schema schema, and the error I get in my extract report is:


      Source Context:



      : [er.sp]



                     : [/home/ecloud/workspace/Build_OpenSys_r11.[34109]/perforce/src/app/er/sp.c]



           : [SP_parse]



      : [465]


      2013-10-25 16:51:43  ERROR   OGG-00349  Error in SQLEXEC clause, id myResults: Missing equals sign for param specifier (ID).




      ... I've tried entering an equals sign in the table spec line ... eg:


      table my_schema.*, SQLEXEC ( ID=


      myResults, QUERY "select sysdate as fooDate from dual " ), TOKENS (TKFOO=@GETVAL(myResults.fooDate));


      ... but I still get an error in the same source module and function, but this time at line 473 rather than 465, with


      the following error printed:


      2013-10-25 17:03:36  ERROR   OGG-00350  Error in SQLEXEC clause, id myResults: Invalid parameter name: ID.



      Can anyone show me a simple example of


      how to use an SQLEXEC in the table spec of an extract to poplate tokens in the trail?  I realize the example above is trivival / not necessary, but I would just like to get a simple example working first, before I attempt to proceed on to a more complex / realistic example.


      Thanks  for any help / insight!