Re: UPDATE Re: Problems with SQL SET statements



On Jan 31, 2:54 pm, "Hau...@xxxxxxxxxxxxxxx" <Hau...@xxxxxxxxxxxxxxx>
wrote:
Hi,

you have to use both SET SCHEMA and SET PATH.

The SCHEMA set with SET SCHEMA is only used to find tables, views and
aliases that are unqualified. With SET SCHEMA only a single Schema/
Library can be specified. If tables or views from more than a single
schema must be used and SQL naming is used, the tables/views must
either be qualified or an alias that points to a table in the other
library must be created in the first one.

If *Sys-Naming is used, the library set with current schema is used
almost like the current library, i.e. it is seached first to find the
tables, but if the tables are not found in the current library, all
other libraries in the library list are searched.

SET PATH is used to find Stored Procedures or User Defined Functions.
With SET PATH more than one schema can be specified. These schemas are
searched in the sequence they are listed. If SQL-Naming is used and
the stored procedures or UDFs are called unqualified, but are loceated
in the same schema as the tables, this schema must be specified in the
SQL path, even though it was set with SET CURRENT SCHEMA.

With *SYS-Naming the library list is searched for both tables/views
and stored procedures/UDFs.

Birgitta


I wonder how much QUSRLIBL and QSYSLIBL system values play a role in
this. What about your JOBD at signon time.
.



Relevant Pages

  • Re: UPDATE Re: Problems with SQL SET statements
    ... you have to use both SET SCHEMA and SET PATH. ... other libraries in the library list are searched. ... SET PATH is used to find Stored Procedures or User Defined Functions. ...
    (comp.sys.ibm.as400.misc)
  • Re: UPDATE Re: Problems with SQL SET statements
    ... you have to use both SET SCHEMA and SET PATH. ... other libraries in the library list are searched. ... SET PATH is used to find Stored Procedures or User Defined Functions. ...
    (comp.sys.ibm.as400.misc)
  • Re: WinQCad vs. EagleCAD
    ... to recapture their schemas from scratch!" ... Why deliberatly infect the designs of honest customers? ... community support would have been the ability to share libraries with ... I don't know where the poster is from but apparently Europe and folks in France and NL use the word schema for schematic diagram. ...
    (sci.electronics.design)
  • Re: Problem with Stored Procedure that conatins several select statements
    ... If you test the stored procedures from the SQL Analyser, ... The Problem is that everytime I create a generated schema there is only ... one element in the response node called "Success" and not the two columns ... the final SELECT then the response elements are created as I expected. ...
    (microsoft.public.biztalk.general)
  • Re: SQL Best Practices Analyzer Rule: Use of Schema Qualified Tables/Views
    ... > How important is to specify the schame (dbo. ... > application may be improved by specifying schema names." ...
    (comp.databases.ms-sqlserver)