7 Replies Latest reply: Mar 27, 2012 12:09 AM by Arun Kumar RSS

sql() function help

Shaun Metro
Currently Being Moderated

I'm trying to implement a sql function in a while loop and I am running into some errors.  No matter what combonation I try Data services doesn't like the syntax.


Please see below for an example of what I'm using:


sql('TABLENAME','select count(*) from TABLENAME where TABLENAME.status = \'U\'')


I always get a "Found erroneous expressions"  error.  I've check spelling etc... and it seems to be ok, am I missing something with syntax?  Doesn anyone have any hints for working with while loops or using the sql() function?



got this to work

sql('SAP_TST', 'select count(*) from TABLENAME where STATUS = \'P\'')