Explicitly Qualifying the Schema for Variables in DB2

Hello All,

Sorry in advance if this question has already been asked. I’m using Toad for DB2 5.1.0.656, LUW Freeware.

Is there a way to set a default Schema when creating variables? As an example below, this SQL only executes correctly if the STOREID variable is qualified with the Schema (“UDBPROD”) in both the SET and SELECT/FROM/WHERE lines. My default Schema is “UDBPROD” and is set as such in the Connections Manager. The Schema does not need to be included before the variable in DECLARE or DROP lines. Is it a requirement to qualify the use of the variable with the Schema everywhere in my query or is there a default setting I am missing in Toad’s Properties?

CREATE VARIABLE STOREID INT;
SET UDBPROD***.*STOREID = 53;
SELECT * FROM STORE_INFO WHERE STOREKEY = UDBPROD
.**STOREID;
DROP VARIABLE STOREID;

Thanks in advance.

Josh