× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Steve,

That is how the *SQL naming convention works, if you don't specify a schema,
or a default schema, it uses your user profile as the schema name.

For traditional as400 library list searching, you need to use the *SYSTEM
naming convention

>From the SQL Programmers Guide

SQL naming (*SQL): In the SQL naming convention, tables are qualified by the
schema name in the
form:
schema.table
If the table name is not explicitly qualified and the default schema name is
specified in the default
relational database collection (DFTRDBCOL) parameter of the CRTSQLxxx
command, the default schema
name is used. If the table name is not explicitly qualified and the default
schema name is not specified, the
rules are:
v For static SQL, the default qualifier is the user profile of the program
owner.
v For dynamic SQL or interactive SQL, the default qualifier is the user
profile of the job running the
statement.

cheers
Colin.W

http://as400blog.blogspot.com

-----Original Message-----
From: Steve Landess [mailto:sjl_abc@xxxxxxxxxxx] 
Sent: 10 March 2005 01:00
To: midrange-l@xxxxxxxxxxxx
Subject: SQL question


I have found that when using *SQL naming convention when using IBM's STRSQL,

the SQL interpreter will not find a file by using the library list. 

Example -
Here is the library list for my interactive job:
                     
Opt   Library       Type
        QSYS         SYS 
        QSYS2        SYS 
        QHLPSYS      SYS 
        QUSRSYS      SYS 
        QSQL         PRD 
        QTEMP        USR 
        ENSHSC       USR 
        ENSDPR       USR 
        FRDTPR       USR 

This SQL statement works just fine:
SELECT * FROM FRDTPR.F01092 

However, If I try this SQL statement (without qualifying the library name):
Select * from F01092

I get the error message:
F01092 in AUSLADTMP type *FILE not found.

I don't have AUSLADTMP specified as my Current library.  
AUSLADTMP is my user profile name...why is interactive SQL assuming the file
is in MY library?

We get the exact same behavior when using a Java program with JDBC to
execute the same SQL statement...

Regards,
Steve 
-- 
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

This e-mail has been sent by a company of Bertram Group Ltd, whose registered 
office is 1 Broadland Business Park, Norwich, NR7 0WF. 
This message, and any attachments, are intended solely for the addressee and 
may contain privileged or confidential information.  If you are not the 
intended recipient, any disclosure, copying, distribution or any action taken 
or omitted to be taken in reliance on it, is prohibited and may be unlawful.  
If you believe that you have received this email in error, please contact the 
sender immediately. Opinions, conclusions and statements of intent in this 
e-mail are those of the sender and will not bind a Bertram Group Ltd company 
unless confirmed in writing by a director independently of this message. 
Although we have taken steps to ensure that this email and any attachments are 
free from any virus, we advise that in keeping with good computing practice the 
recipient should ensure they are actually virus free.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.