Re: Prepared cursor with matches
Posted in 1997
Bill Ennis wrote: } } Hi, } } I might be able to help but I need to see the open statement. } } -Bill } } } } I'm trying to prepare a cursor using } } } } PREPARE thingy FROM } } "SELECT * \\ } } FROM table \\ } } WHERE col1 = ? \\ } } AND col2 MATCHES ?" You need to put quotes around the second variable, like AND col2 MATCHES '?'" HTH } } } } 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. } }