> Hi All,
> I am try to create a store procedure in DB2 version 8.1 Personal Edition.
> I new also new to DB2. I am getting the following error:
> [IBM][CLI Driver][DB2/NT] SQL0204N "MYDB.MYOPTIONS" is an undefined
> [name.
> LINE NUMBER=8. SQLSTATE=42704
$ db2 "? sql0204"
SQL0204N "<name>" is an undefined name.
> Environment:
> Windows 2000 Professional SP4
[quoted text clipped - 18 lines]
> FROM MYOPTIONS JOIN MYORGANIZATION ON MYOPTIONS.ORGANIZATIONID =
> MYORGANIZATION.ORGUNIQUEID
Here you are referring to a table (or view) named "MYOPTIONS". This table
is not found. You should either set the CURRENT SCHEMA special register to
the schema in which the table was defined, or specify the fully qualified
table name, i.e. myschema.myoptions.
I would always prefer the 2nd approach because it makes things much clearer.
(I never accepted saving a few keystrokes as a valid reason to have to
start guessing at the meaning of some piece of code.)
> WHERE MYORGANIZATION.ORGNAME = (USER) ;
> DECLARE CONTINUE HANDLER FOR SQLEXCEPTION, SQLWARNING, NOT FOUND
> SET S_SQLCODE= SQLCODE;
> OPEN S_Temp_Cursor0 ;
> END P1

Signature
Knut Stolze
Information Integration
IBM Germany / University of Jena