MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQL return code -142

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
chandra
Beginner


Joined: 26 Sep 2003
Posts: 130
Topics: 36

PostPosted: Fri Feb 17, 2006 4:56 pm    Post subject: SQL return code -142 Reply with quote

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
           
            OBJ_SUMMARY.STATUS_CD        = :K-SPACE
    END-EXEC.


_________________
Regards,
Chandra
Back to top
View user's profile Send private message
kraj
Beginner


Joined: 15 Apr 2004
Posts: 8
Topics: 2

PostPosted: Sun Feb 19, 2006 10:34 pm    Post subject: sqlcode -142 Reply with quote

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.

SQLSTATE: 42612
===================

thanks.
kraj.
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Tue Feb 21, 2006 7:18 am    Post subject: Reply with quote

Chandra,

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.

Thanks
Shekar123
_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
chandra
Beginner


Joined: 26 Sep 2003
Posts: 130
Topics: 36

PostPosted: Tue Feb 21, 2006 10:24 am    Post subject: Reply with quote

Hi Shekar,

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group