How to get required SQL Result Set..?

  • [font="Courier New"]Hi All,

    This query is the query I have written

    Select Distinct

    GT.P_CODE As P,

    GT.GT_CODE,

    GT.FG_DESCRIPTION As T_SIZE,

    GT.PLANNED_QUANTITY As TOTAL_SCH,

    GT.PROGRESS_QTY As PROD_MTD,

    GT.PLANNED_QUANTITY - GT.PROGRESS_QTY As T_BALANCE,

    CASE WHEN GT.FG_DESCRIPTION = IT.FG_DESCRIPTION THEN NULL ELSE IT.FG_DESCRIPTION END AS INCOMING_SIZE,

    CASE WHEN GT.FG_DESCRIPTION = IT.FG_DESCRIPTION THEN NULL ELSE IT.PLANNED_QUANTITY END AS SCH

    From

    GT_BAPI_INP_EXP_SCH GT WITH(NOLOCK)

    Inner Join

    IT_BAPI_INP_EXP_SCH IT

    On

    GT.P_CODE = IT.P_CODE

    AND

    GT.MOULD_CODE = IT.MOULD_CODE

    Order By

    GT.P_CODE ASC

    PFA Output get from above query and Output want to come in EXCEL Sheet..[/font]

    Thanks,

    Bhushan

  • You probably want to look at using SSIS with Excel as a destination.

    _________________________________________________________________________
    SSC Guide to Posting and Best Practices

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

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