Forum Replies Created

Viewing 15 posts - 211 through 225 (of 541 total)

  • RE: SQL Query

    ChrisM@Work (1/11/2013)


    Hi Paul

    I'll try to have a look over the weekend. Meantime, it's the last 5 mins of my last day here - and it's BEERTIME!

    Cheers

    ChrisM

    Hi Chris,

    Best of luck for...

  • RE: SQL Query

    ChrisM@home (1/13/2013)


    Hi Paul

    Your sample data set doesn't have a matching row between MG_VSLVOY_HEADER and MG_VSLVOY_PORT_CONTROL:

    SELECT ncv.*, vh.VSLVOY_HEADER_ID

    FROM NCV_BL ncv

    JOIN MG_VSLVOY_HEADER vh

    ON ncv.saisan_VESSEL_CD = vh.VESSEL_CD

    AND ncv.saisan_VOYAGE_CD = vh.VOYAGE_NUM

    AND ncv.saisan_LEG_CD...

  • RE: SQL Query

    ChrisM@Work (1/11/2013)


    Hi Paul

    I'll try to have a look over the weekend. Meantime, it's the last 5 mins of my last day here - and it's BEERTIME!

    Cheers

    ChrisM

    Thanks a lot Chris, whenever...

  • RE: SQL Query

    ChrisM@Work (1/11/2013)


    pwalter83 (1/11/2013)


    ChrisM@Work (1/11/2013)


    I think this better fits the spec:

    SELECT SUM(teu) AS TEU

    FROM NCV_BL ncv

    JOIN MG_VSLVOY_HEADER vh

    ON ncv.saisan_VESSEL_CD = vh.VESSEL_CD

    AND ncv.saisan_VOYAGE_CD = vh.VOYAGE_NUM

    AND ncv.saisan_LEG_CD = vh.LEG_CD

    JOIN MG_VSLVOY_PORT_CONTROL vpc...

  • RE: SQL Query

    ChrisM@Work (1/11/2013)


    I think this better fits the spec:

    SELECT SUM(teu) AS TEU

    FROM NCV_BL ncv

    JOIN MG_VSLVOY_HEADER vh

    ON ncv.saisan_VESSEL_CD = vh.VESSEL_CD

    AND ncv.saisan_VOYAGE_CD = vh.VOYAGE_NUM

    AND ncv.saisan_LEG_CD = vh.LEG_CD

    JOIN MG_VSLVOY_PORT_CONTROL vpc

    ON vh.VSLVOY_HEADER_ID...

  • RE: SQL Query

    ChrisM@Work (1/11/2013)


    Why do you need to join to the other tables if they aren't contributing to the query, either as output or as a filter?

    This is because of the following...

  • RE: SQL Query

    ChrisM@Work (1/11/2013)


    pwalter83 (1/11/2013)


    ChrisM@Work (1/11/2013)


    Paul, which table contains column 'teu'? (and 'BL_ID')

    Put that table first in the FROM list and inner join the other tables.

    Comment out all of the joins...

  • RE: SQL Query

    ChrisM@Work (1/11/2013)


    Paul, which table contains column 'teu'? (and 'BL_ID')

    Put that table first in the FROM list and inner join the other tables.

    Comment out all of the joins to the...

  • RE: SQL Query

    Andy Hyslop (1/11/2013)


    Hi

    Your DDL seems to be missing VOYAGE_NUM in the table MG_VSLVOY_HEADER

    Andy

    Sorry about that, its there now.

  • RE: VB script error

    Lowell (11/26/2012)


    those two dll's, java.util.zip.dll? and java.io.dll? need to be in the same folder as the script you are calling.

    they probably are not,and i'm not sure how to insert...

  • RE: Create select statement for the query

    pwalter83 (10/24/2012)


    Eugene Elutin (10/18/2012)


    Which tables all of these PLACE_OF_DELIVERY, PLACE_OF_RECEIPT and saisan_month columns come from?

    They are not in your DDL and you didn't use table aliases in your query...

    Hi Eugene,

    I...

  • RE: Create select statement for the query

    Eugene Elutin (10/18/2012)


    Which tables all of these PLACE_OF_DELIVERY, PLACE_OF_RECEIPT and saisan_month columns come from?

    They are not in your DDL and you didn't use table aliases in your query...

    Hi Eugene,

    I have...

  • RE: Create select statement for the query

    Eugene Elutin (10/18/2012)


    Which tables all of these PLACE_OF_DELIVERY, PLACE_OF_RECEIPT and saisan_month columns come from?

    They are not in your DDL and you didn't use table aliases in your query...

    Thanks Eugene,

    The PLACE_OF_DELIVERY,...

  • RE: Create select statement for the query

    Sean Lange (10/18/2012)


    pwalter83 (10/18/2012)


    Sean Lange (10/18/2012)


    Thank you for the ddl and sample data. However your requirement mentions a column TEU. This is not present on any of the tables you...

  • RE: Create select statement for the query

    Sean Lange (10/18/2012)


    Thank you for the ddl and sample data. However your requirement mentions a column TEU. This is not present on any of the tables you provided.

    Sorry Sean, I...

Viewing 15 posts - 211 through 225 (of 541 total)