|
I've used
SELECT COUNT(*) INTO :#RecsFound FROM SRCMBR WHERE POSSTR(SrcDta, RTRIM(:cVarString1)) <> 0
where cVarString1 was the string that I was looking for.
----Original Message Follows---- From: EDoxtator <doc6502@xxxxxxxxx> Reply-To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To: rpg400-l@xxxxxxxxxxxx Subject: Alternatives to LIKE in SQL Date: Wed, 4 Aug 2004 09:40:17 -0700 (PDT)
Hey All
I was thinking I'd to do Dynamic SQL that looks something like this:
SELECT COUNT(*) FROM SRCMBR WHERE SRCDTA LIKE '%<field name>%' AND SUBSTR(srcdta,7,1) <> '*'
Any ideas?
Thanks
-Doc
-- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.