explain for a dynamic sql

explain for a dynamic sql

 

  

db2 version 8.2.3
I am enclosing a sample query

C:\>db2 explain snapshot for
SELECT C.DISCLOSURE_ APPROVAL_ STATUS_CD, C.PLACEMENT_AGREEMENT_DT,
C.ADOPTIVE_ PLACEMENT_ STATUS_CD, C.ADOPTION_ ID,C.CASE_ ID,
C.CLIENT_ID,C.ADOPTION_PLAN_ BEGIN_DT FROM TB_ADOPTION C
WHERE C.CLIENT_ID = :ai_client_id;

DB21034E The command was processed as an SQL statement because it
was not a valid Command Line Processor command. During SQL processing it
returned:SQL0104N An unexpected token "." was found
following "ASE_ID,C.CLIENT_ ID,C".
Expected tokens may include: "JOIN <joined_table> ". SQLSTATE=42601

any suggestions on further approach, I wrote an utility to extract
the sql code from the powerbuilder source code.I need to analyze the
sql code to identify performance chokeups, most of the chokeups are
as a result of improper indexes and excessive sort times. I need a
way to analyze dynamic sql statements,once I do so I can identify the
resultant object screen on the application.


DB2 & UDB email list listserv db2-l LazyDBA home page