Home > Ask the AS/400 Experts > DB2/400 and DB2 UDB Questions & Answers > Is the SQL Path being used?
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Is the SQL Path being used?

Kent Milligan EXPERT RESPONSE FROM: Kent Milligan

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 13 January 2005
I am running interactive SQL (STRSQL) on iSeries at V5R1 set path a73dta2 PATH statement complete.
 select imlitm                       
     from f4101                       
     FETCH FIRST 10 ROWS ONLY         
  F4101 in *LIBL type *FILE not found. 
> select imlitm                   
     from a73dta2/f4101           
     FETCH FIRST 10 ROWS ONLY     
  SELECT statement run complete. 

It seems the iSeries is not using the PATH, except for "The SQL path is an ordered list of schema names. The database manager uses the path to resolve the schema name for unqualified distinct type names (both built-in types and distinct types), function names, and procedure names..."

Can you see from this what I am missing?


>
EXPERT RESPONSE
Yes, the SQL Path is not used for unqualified table names. The SQL Path is only used by DB2 when you have an unqualified procedure or function name in an SQL statement.

If you're at V5R2 or V5R3, you can use the SET SCHEMA statement for unqualified view & table names. Another alternative is using the *SYS SQL Naming option which uses the OS/400 library list to search for unqualified table & view names.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

Visit the ITKnowledge Exchange and get answers to your DB2 questions fast.

Check out this Search400.com Featured Topic: Expert advice on DB2

Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: Tips, tutorials and more.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Oracle on iSeries
Debating DB2 versus Oracle
IBM steps up iSeries, pSeries overlap
Securing query definitions
New, undocumented Query function can boost your productivity
Get the system to recognize a date separator
Run multiple SQL statements
Updating the 'VALUE' column using DB2/400
Populate a Lotus Notes database with iSeries data
Inserting data into a table
CHAR fields vs. VARCHAR

DB2/400 and DB2 UDB
Running source member SQL statements with RUNSQLSTM
Enabling IBM i to access Microsoft SQL server data
Using SQL to search within a DB2 field on IBM i
Controlling a library list on a remote system
Auditing: RPG with embedded SQL showing up as a changed object
Selecting a PF with multiple members from SQL
Referencing a renamed column on SELECT clause in SQL
Using WebSphere information integrator to access MS server data using SQLRPGLE
Joining files using SQLRPGLE
Querying system catalog tables to determine table alias

DB2 UDB (universal databases)
How to: Sort arrays using RPGIV
Debating DB2 versus Oracle
IBM i news updates for the week of 10/13/2008
Auditing: RPG with embedded SQL showing up as a changed object
DB2 on AS/400: What has it done for me lately?
How to: Transfer unlimited data to Excel from AS/400
What is an integrated database?
An automated CL method of moving a query from AS/400 to Excel
Using WebSphere information integrator to access MS server data using SQLRPGLE
Querying system catalog tables to determine table alias
DB2 UDB (universal databases) Research

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts