5 pts.
 enter SRTSQL Satements AS400
Hi, I have done an index by "create index......" and when I am trying to do aquery with STRSQL on that index I receive the following error:

BKPPDAI1 in BKTEST not table, view, or physical file.

This is my Statement:

select *from bktest/BKPPDAI1

I am trying to fix the syntaxis but I can not make it work... please I need to know why ando how to fix this. THANKS.



Software/Hardware used:
AS400
ASKED: May 6, 2012  3:46 PM
UPDATED: May 7, 2012  12:52 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

SQL queries should always be writen on the Physical File
The query engine decides when to use an index to speed processing.

 44,630 pts.

 

…writen on the Physical File

Phil is right.

You don’t query the index; you query the table and DB2 decides when to use the index. All you need to do is create the index. It will be used when it is needed.

Tom

 110,155 pts.

 

If you do a WRKOBJ bktest/BKPPDAI1
Does this object exist?

 33,730 pts.