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
SQL queries should always be writen on the Physical File
The query engine decides when to use an index to speed processing.
…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
If you do a WRKOBJ bktest/BKPPDAI1
Does this object exist?