cancel
Showing results for 
Search instead for 
Did you mean: 

SQL () Function in Information Steward Rule

0 Kudos

Hello -

I'm trying to utilize the SQL function in a simple Information Steward rule:

BEGIN
SQL('IS_STAGE', 'SELECT matnr, mtart, mfrpn, mfrnr FROM dbo.MARA_EXT WHERE mtart = \'ZRSA\'');
END

But I keep getting the same syntax error despite using the same syntax as SAP's user guide:

"Mismatched expression <left parenthesis>, expecting <=>. (COR -10608)"

Any help would be appreciated. We'd like to use the SQL function to build rules in the future but if this is not possible, that'd be great to know as well.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member187605
Active Contributor
0 Kudos

You must assign the result of the SQL function to a variable, e.g.

$MATNR = SQL('IS_STAGE', 'SELECT matnr FROM dbo.MARA_EXT WHERE mtart = \'ZRSA\'');

0 Kudos

Hi Drik,

I am trying to implement the above logic but facing issue

SQL('source name', 'SELECT LastModDt FROM table name Where LastModDt = \'2017-02-06 09:51:31.033\");

issue : Syntax error at <end of expression>. (COR-10611)

Could you please help to resolve this issue

Answers (2)

Answers (2)

former_member187605
Active Contributor
0 Kudos

Sure, the impact on performance will be high. There is a round-trip to the database for every record validated.

0 Kudos
dirk.venken

Thanks for your reply - I figured it was something relatively simple. As a follow up, does using the SQL function have a time impact on how long it takes the rule to be scored and view results? I was able to get the above statement to validate and am expecting about 1300 lines but it seems to take much longer than I would've thought.


Thanks