Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006
    Posts
    1

    Unanswered: Can you figure out the SQLCODE 203 Error ?

    Can anyone figure out why I am getting the SQL 203 below ?

    SELECT DISTINCT
    SP.SPCLT_CD,
    CASE CI.CORP_ENT_CD
    WHEN 'IL1' THEN ' '
    ELSE SP.PROV_TYP_CD
    END AS XPROV_TYP_CD,
    ST.PWN_STA_CD
    FROM
    TPSDB05.PAL_PFIN PP
    INNER JOIN
    TPSDB05.PWN_CI_PFIN CI
    ON PP.PROV_ID = CI.PROV_ID
    INNER JOIN
    TPSDB05.PWN_SPCLT SP
    ON CI.PROV_ID = SP.PROV_ID
    AND CI.NWK_CD = SP.NWK_CD
    AND CI.SUB_NWK_CD = SP.SUB_NWK_CD
    AND CI.CORP_ENT_CD = SP.CORP_ENT_CD
    INNER JOIN
    TPSDB05.PWN_SPCLT SP
    ON CI.PROV_ID = SP.PROV_ID
    AND CI.NWK_CD = SP.NWK_CD
    AND CI.SUB_NWK_CD = SP.SUB_NWK_CD
    AND CI.CORP_ENT_CD = SP.CORP_ENT_CD
    INNER JOIN
    TPSDB05.PWN_STATUS ST
    ON CI.PROV_ID = ST.PROV_ID
    AND CI.NWK_CD = ST.NWK_CD
    AND CI.SUB_NWK_CD = ST.SUB_NWK_CD
    AND CI.CORP_ENT_CD = ST.CORP_ENT_CD
    WHERE
    PP.PROV_ID = 354664370 AND
    CI.CORP_ENT_CD = 'OK1' AND
    CI.NWK_CD IN
    (SELECT CD_VAL
    FROM TPSDB05.CODE_REF
    WHERE CD_REF_NM = 'BRE03PCPA'
    AND CORP_ENT_CD = 'OK1'
    AND VLDT_IND = 'Y'
    AND CD_EFDT <= '2006-08-21'
    AND (CD_END_DT > '2006-08-21'

    OR CD_END_DT IS NULL)) AND
    CI.SUB_NWK_CD IN
    (SELECT CD_VAL
    FROM TPSDB05.CODE_RELSHP
    WHERE CD_REF_NM = 'BREXTSUBN'
    AND CORP_ENT_CD = 'OK1'
    AND REL_CD_REF_NM = 'BREXTPCPA'
    AND REL_CD_VAL = CI.NWK_CD
    AND VLDT_IND = 'Y'
    AND REL_CD_EFDT <= '2006-08-21'
    AND (REL_CD_END_DT > '2006-08-21'
    OR REL_CD_END_DT IS NULL)) AND
    PP.ACTVN_DT <= '2006-08-21' AND
    CI.VLDT_IND = 'Y' AND
    CI.PWN_CI_PFIN_EFDT <= '2006-08-21' AND
    ( CI.PWN_CI_PFIN_END_DT IS NULL
    OR CI.PWN_CI_PFIN_END_DT > '2006-08-21')
    AND
    SP.VLDT_IND = 'Y' AND
    SP.SPCLT_CD IN
    (SELECT CD_VAL
    FROM TPSDB05.CODE_REF
    WHERE CORP_ENT_CD = 'OK1'
    AND CD_REF_NM = 'BRE03SPCLT'
    AND VLDT_IND = 'Y'
    AND CD_EFDT <= '2006-08-21'
    AND (CD_END_DT > '2006-08-21'
    OR CD_END_DT IS NULL)) AND
    SP.PWN_SPCLT_EFDT <= '2006-08-21' AND
    (SP.PWN_SPCLT_END_DT IS NULL
    OR SP.PWN_SPCLT_END_DT > '2006-08-21')
    AND
    ST.VLDT_IND = 'Y' AND
    ST.PWN_STA_EFDT <= '2006-08-21' AND
    (ST.PWN_STA_END_DT IS NULL
    OR ST.PWN_STA_END_DT > '2006-08-21');


    DSNT404I SQLCODE = 203, WARNING: THE QUALIFIED COLUMN NAME SP.SPCLT_CD WAS
    RESOLVED USING A NON-UNIQUE OR UNEXPOSED NAME
    DSNT418I SQLSTATE = 01552 SQLSTATE RETURN CODE
    DSNT415I SQLERRP = DSNXORSO SQL PROCEDURE DETECTING ERROR
    DSNT416I SQLERRD = 0 0 1 1108504850 0 0 SQL DIAGNOSTIC INFORMATION
    DSNT416I SQLERRD = X'00000000' X'00000000' X'00000001' X'42127112'
    X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION

    SPCLT_CD XPROV_TYP_CD PWN_STA_CD
    ---------+---------+---------+---------+---------+---------+---------+---------+
    DSNE610I NUMBER OF ROWS DISPLAYED IS 0
    DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 100

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    I see the part
    Code:
    INNER JOIN
    TPSDB05.PWN_SPCLT SP
    ON CI.PROV_ID = SP.PROV_ID
    AND CI.NWK_CD = SP.NWK_CD
    AND CI.SUB_NWK_CD = SP.SUB_NWK_CD
    AND CI.CORP_ENT_CD = SP.CORP_ENT_CD
    appear twice, i.e., you are joining two tables with the same alias name "SP".
    Most likely you must just remove those 6 lines.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •