Re: Prepared cursor with matches
Posted in 1997
Aha - found the problem. I didn't realise you could use FOREACH ... USING, so I was doing an OPEN ... USING, followed by a FOREACH. It would appear that the OPEN wasn't the problem, it was the FOREACH. Davin ______________________________ Reply Separator _________________________________ Subject: Prepared cursor with matches Author: "Davin Harvey" <Davin_Harvey_at_LLCS-MAXIM@lendlease.com.au> at Internet Date: 14/1/97 11:14 AM I'm trying to prepare a cursor using PREPARE thingy FROM "SELECT * \\ FROM table \\ WHERE col1 = ? \\ AND col2 MATCHES ?" DECLARE curs1 CURSOR FOR thingy When I open this cursor using two variables, I get "Too many or too few host variables given", but it works if I replace the MATCHES with an =. However, the second placeholder may contain a wildcard, so I need to use MATCHES. I'm compiling to 4ge using V6.03.UC2, Online V7.13.UC2 on HP-UX 10.10. Davin