Highlighted
Absent Member.
Absent Member.
411 views

[archive] ACUSql If Clause

[Migrated content. Thread originally posted on 17 May 2006]

Hello,
Can you use the If clause in AcuSql?
I'm trying to use the following code:

EXEC SQL
IF :WS-VALUE-CHECK = 1
DECLARE COBCUR2 CURSOR FOR
SELECT PK, PREFIX, ID, SUFFIX, NAME, FARM, FARMCOUNT, DIV,
FARMSTATE, FARMCOUNTY, OPERPK, ACTIONS,PHLPK, ASNPK,
SWISSID
FROM VW_PATRONS_IN_TBL_PAYROLLDATA_1 WITH (NOLOCK)
END-EXEC

I get the following error message:

parse error at IF
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

RE: [archive] ACUSql If Clause

You need to use the "where" statement. Check this Tutorial for SQL syntax
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.