|
Greg, are you sure? I tried this and got a Pre-Compiler error saying the
WHERE was not expected. Also, I don't see WHERE as a valid token in the
SQL reference manual.
"Whiteman, Greg"
<Greg.Whiteman@transam To:
"'rpg400-l@midrange.com'"
erica.com> <rpg400-l@midrange.com>
Sent by: cc:
rpg400-l-admin@midrang Fax to:
e.com Subject: RE: Embedded SQL
exists?
11/28/2001 01:29 PM
Please respond to
rpg400-l
You could incorporate all into one sql. For example:
C
C/EXEC SQL
C+ INSERT INTO EMAILFDST
C+ VALUES(:EMAILFDST)
C+ WHERE NOT EXISTS
C+ (SELECT 1 FROM EMAILFDST
C+ WHERE EMDFIL=:EMDFIL AND
C+ EMDCMP=:EMDCMP AND
C+ EMDFAC=:EMDFAC AND
C+ EMDUSR=:EMDUSR)
The insert will occur only if no row exists in file EMAILFDST for the
criteria specified in the WHERE clause
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.