Command: SQL

Previous  Next |  Direct link to this topic

Go to list of all Commands

Syntax: SQL('<MySQLSentence>');

 

You can use this command together with the if/while commands to evaluate on results from the database by storing the result in a store.

Example:

@STORE1 = SQL('SELECT CardType FROM OCRD WHERE CardCode = $[$5.0.0]');

IF (@STORE1 = 'S')

BEGIN

    (statement)

END

 

NB: Cannot be used as input to a macro command – only designed for use with the conditional commands