Forum Replies Created

Viewing 4 posts - 16 through 19 (of 19 total)

  • RE: Summarized SQL Server T-SQL Report

    create table cust (CustomerName char(4),

    CustomerRefNumber int,

    InvoiceNumber varchar(10),

    InvoiceAmount int)

    insert into cust values ('AAA', 111, 'Inv001', 1000)

    insert into cust values('AAA', 111, 'Inv002', 1100)

    -----

    insert into cust values('BBB', 222, 'Inv003', 3000)

    insert into cust values...

  • RE: SQL query

    ''Assign Tradelane to each BL_ID ('NCV_BL_DHL_TEMP' table) using

    fields - POL_COUNTRY_CD ('NCV_BL_DHL_TEMP' table) and POD_COUNTRY_CD ('NCV_BL_DHL_TEMP' table) and

    COUNTRY_CD ('DHL_TRADE_ASSIGNMENT' table). Also, any BL_ID where it is not possible to map/set...

  • RE: Performance where <> in <> inner join

    select * FROM Table a

    where

    a.Country in

    (select Country from V_LOAD_COMBINATION and

    a.Date in

    (select Date from V_LOAD_COMBINATION )

    ------- INNER JOIN

    select * FROM Table a

    inner join V_LOAD_COMBINATION b

    on

    a.Country= b.Country and

    a.Date = b.Date

    If...

  • RE: Child and parent Relation

    CREATE TABLE OrderTest

    (id INT,

    parentid INT NULL)

    --test data

    INSERT INTO OrderTest VALUES (1, NULL)

    INSERT INTO OrderTest VALUES (2, NULL)

    INSERT INTO OrderTest VALUES (3, NULL)

    INSERT INTO OrderTest VALUES (4, 1)

    INSERT INTO OrderTest VALUES...

Viewing 4 posts - 16 through 19 (of 19 total)