![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In an sqx file, I am able to declare a standard cursor. But the database option is failing. Example: DECLARE STDDEMO CURSOR DATABASE source USER userid USING <pwd FOR SELECT person_id FROM userid.person WHERE name = :sName; The compiler returns: SQL0104N An unexpected token "DATABASE" was found following "CURSOR". Expected tokens may include: "FOR". |
#3
| |||
| |||
|
|
On Sun, 22 Jan 2012 19:28:15 -0800 (PST), Kdawg wrote: In an sqx file, I am able to declare a standard cursor. *But the database option is failing. Example: DECLARE STDDEMO CURSOR DATABASE source USER userid USING <pwd * * * * FOR SELECT person_id FROM userid.person * * * * WHERE name = :sName; The compiler returns: SQL0104N *An unexpected token "DATABASE" was found * * * * * * * * * following "CURSOR". *Expected tokens may include: "FOR". And this is on a system with version of at least 9.1? The paragrph below Listing 17 says this method exists since 9.1. http://www.ibm.com/developerworks/da...cle/dm-0901fec... -- 25. No matter how well it would perform, I will never construct any * *sort of machinery which is completely indestructible except for one * *small and virtually inaccessible vulnerable spot. * * * * --Peter Anspach's list of things to do as an Evil Overlord |
#4
| |||
| |||
|
|
Yes, version 9.1.0.9 On Jan 22, 11:15*pm, "Peter H. Coffin" <hell... (AT) ninehells (DOT) com> wrote: On Sun, 22 Jan 2012 19:28:15 -0800 (PST), Kdawg wrote: In an sqx file, I am able to declare a standard cursor. *But the database option is failing. Example: DECLARE STDDEMO CURSOR DATABASE source USER userid USING <pwd * * * * FOR SELECT person_id FROM userid.person * * * * WHERE name = :sName; The compiler returns: SQL0104N *An unexpected token "DATABASE" was found * * * * * * * * * following "CURSOR". *Expected tokens may include: "FOR". And this is on a system with version of at least 9.1? The paragrph below Listing 17 says this method exists since 9.1. http://www.ibm.com/developerworks/da...cle/dm-0901fec... -- 25. No matter how well it would perform, I will never construct any * *sort of machinery which is completely indestructible except for one * *small and virtually inaccessible vulnerable spot. * * * * --Peter Anspach's list of things to do as an Evil Overlord- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |