|
On 12/5/10 8:26 AM, Paul Tuohy wrote:
Is it the case that SET SCHEMA has no effect in embedded
SQL - regardless of which naming is being used?
See the docs. The CURRENT SCHEMA is applied as qualifier only for dynamic SQL statements. Refer to the PRTSQLINF output of a program with embedded SQL to see the DFTRDBCOL or NAMING option to know what is the default for CURRENT SCHEMA.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmstsetschema.htm
CURRENT SCHEMA: The value of the CURRENT SCHEMA special register is used as the qualifier for unqualified names in all dynamic SQL statements except in programs where the DYNDFTCOL has been specified. If DYNDFTCOL is specified in a program, its schema name is used instead of the CURRENT SCHEMA schema name.
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.