Posted: Fri Feb 17, 2006 4:56 pm Post subject: SQL return code -142
Hi ,
I am getting SQL Return code -142 for only some records. When I looked at the table these records are matching all conditions with the where clause. Can any body through some light on this SQL.
Code:
EXEC SQL
SELECT
CLT_OBJ_RELATION.CLIENT_ID,
CLT_OBJ_RELATION.TCH_OBJ_KEY,
OBJ_SUMMARY.OBJ_STATUS_CHG_DT,
OBJ_SUMMARY.OBJ_STATUS,
CLT_CURR_SUM.CIID_SEX_CD,
CLT_CURR_SUM.CINM_FST_NM,
CLT_CURR_SUM.CINM_MDL_NM,
CLT_CURR_SUM.CINM_LST_NM,
CLT_CURR_SUM.CIID_DOB
INTO
:HV-CLIENT-ID,
:HV-TCH-OBJ-KEY,
:HV-OBJ-STATUS-CHG-DT,
:HV-OBJ-STATUS,
:HV-CIID-go-away-spammer-sucker-CD,
:HV-CINM-FST-NM,
:HV-CINM-MDL-NM,
:HV-CINM-LST-NM,
:HV-CIID-DOB
FROM
CLT_OBJ_RELATION,
CLT_CURR_SUM,
OBJ_SUMMARY
WHERE
CLT_OBJ_RELATION.TCH_OBJ_KEY = :HV-CLM-HLTH-KY AND
CLT_OBJ_RELATION.OBJ_SYS_ID = :K-CNTR AND
CLT_OBJ_RELATION.OBJ_CD = :K-POL AND
CLT_OBJ_RELATION.RLT_TYP_CD = :K-INSD AND
CLT_OBJ_RELATION.STATUS_CD = :K-SPACE AND
CLT_OBJ_RELATION.CLIENT_ID = CLT_CURR_SUM.CLIENT_ID
AND
CLT_OBJ_RELATION.TCH_OBJ_KEY = OBJ_SUMMARY.TCH_OBJ_KEY
AND
Posted: Sun Feb 19, 2006 10:34 pm Post subject: sqlcode -142
Chandra,
this is the description for SQLCODE -142.
==================================
-142 THE SQL STATEMENT IS NOT SUPPORTED
Explanation: An SQL statement was detected that is not supported by the database. The statement might be valid for other IBM relational database products or it might be valid in another context. For example, statements such as VALUES and SIGNAL SQLSTATE can appear only inside a trigger.
System Action: The statement cannot be executed.
Programmer Response: Change the syntax of the SQL statement or remove the statement from the program.
Please check up all the table columns and the host variable declarations as well as the where condition clause and see if they form a valid and proper sql query.
I have seen in the table it contain all the columns and it has values as mentioned in the table. I ran the same query and I am able to get the results. _________________ Regards,
Chandra
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum