join error

  • (select PARTY_NAME from partymst

    where PARTY_ST='D' AND

    partymst.PARTY_NO in (

    (Select SPD.PARTY_NO from trinvs, sporddtl SPD INNER JOIN spordsch SPOR ON

    SPD.PROJCT_NO=SPOR.PROJCT_NO

    AND SPD.DOC_TYPE=' 49'

    where spor.DOC_TYPE=trinvs.DOC_TYPE and spor.DOC_NO=trinvs.DOC_NO

    and Trinvs.Doc_Type =' 3E' And Trinvs.Doc_No Between 'PRI011617000382' And 'PRI011617000382' )))As project_NAME

  • What's your question?

    The query you posted is invalid. Try something like this:

    SELECT (

    SELECT PARTY_NAME

    FROM partymst

    WHERE PARTY_ST = 'D'

    AND partymst.PARTY_NO IN (

    SELECT SPD.PARTY_NO

    FROM trinvs

    ,sporddtl SPD

    INNER JOIN spordsch SPOR ON SPD.PROJCT_NO = SPOR.PROJCT_NO

    AND SPD.DOC_TYPE = ' 49'

    WHERE spor.DOC_TYPE = trinvs.DOC_TYPE

    AND spor.DOC_NO = trinvs.DOC_NO

    AND Trinvs.Doc_Type = ' 3E'

    AND Trinvs.Doc_No BETWEEN 'PRI011617000382'

    AND 'PRI011617000382'

    )

    ) AS project_NAME

    -- Gianluca Sartori

  • spaghettidba (9/23/2016)


    What's your question?

    The query you posted is invalid. Try something like this:

    SELECT (

    SELECT PARTY_NAME

    FROM partymst

    WHERE PARTY_ST = 'D'

    AND partymst.PARTY_NO IN (

    SELECT SPD.PARTY_NO

    FROM trinvs

    ,sporddtl SPD

    INNER JOIN spordsch SPOR ON SPD.PROJCT_NO = SPOR.PROJCT_NO

    AND SPD.DOC_TYPE = ' 49'

    WHERE spor.DOC_TYPE = trinvs.DOC_TYPE

    AND spor.DOC_NO = trinvs.DOC_NO

    AND Trinvs.Doc_Type = ' 3E'

    AND Trinvs.Doc_No BETWEEN 'PRI011617000382'

    AND 'PRI011617000382'

    )

    ) AS project_NAME

    If that's even the question. 😉

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply