Forum Replies Created

Viewing 15 posts - 16 through 30 (of 68 total)

  • RE: INSERT INTO SELECT WITH ORDER BY

    Yes, TEST SQL always order by V1 then V2, but what exception make it don't sort?

  • RE: Howw to Group by some group

    😀 very simple, very ok

    Thank WayneRooney

  • RE: Set Date & Time to Fixed

    Thanks Paul,

    I trying to setting DATE&TIME on my computer to fixed, but i can not setting for TIME.

    I do that becasue i want to run auto test. If can not,...

  • RE: Set Date & Time to Fixed

    Paul White NZ (5/21/2010)


    What do you mean 'fixed'? :unsure:

    select CONVERT(CHAR(8),GETDATE(),112)

    select CONVERT(CHAR(8),GETDATE(),8)

    result:

    --------

    20100521

    --------

    18:27:51

    I want at any time when run code then always for above result.

    sorry for late reply

    Pls, help me.

    Thanks

  • RE: INNER JOIN and WHEwhat is order execute?

    Thank all for all support:-D

    I'm understand:-P

  • RE: INNER JOIN and WHEwhat is order execute?

    if the data volume on 2 table are > 20.000.000 record and index seek for all join and where, what is the way SQL choose?

  • RE: Join if Exists

    N/A

  • RE: Join if Exists

    nguyennd (5/2/2010)


    Yes, I think so.

    WHEN EXISTS (SELECT * FROM B WHERE B.Second_CustNo = C.CustNo_C) THEN 1

    =>WHEN EXISTS (SELECT * FROM B JOIN A ON A.CusNo_A = B.CustNo_B WHERE B.Second_CustNo =...

  • RE: Join if Exists

    Yes, I think so.

    I rewrite your query:

    WHEN EXISTS (SELECT * FROM B JOIN A ON A.CusNo_A = B.CustNo_B WHERE B.Second_CustNo = C.CustNo_C) THEN 1

    WHEN EXISTS (SELECT * FROM A...

  • RE: Join if Exists

    @paul-2 White NZ : Thanks you for help.

    But about require of business:

    WHEN EXISTS (SELECT * FROM B WHERE B.Second_CustNo = C.CustNo_C) THEN 1

    If not extist (A.CustNo_A = B.CustNo_B)...

  • RE: Join if Exists

    @The Dixie Flatline : Thanks you very much.

    The query is short more.. Of course, tables A, B, and C are all indexed on the customer number columns.

  • RE: Join if Exists

    Any guidance would be appreciated.... Thanks!

  • RE: Join if Exists

    I have a SQL for my solution:-D

    select * from

    A

    left join B

    on A.CusNo_A = B.CustNo_B

    inner join C

    on B.Second_CustNo = C.CustNo_C OR A.CusNo_A = C.CustNo_C

    where

    (Second_CustNo = CustNo_C)

    or

    (CusNo_A = CustNo_C AND...

  • RE: How to get row value after GROUP BY by MIN or MAX

    Huhu = hic hic 😀

    Thank Paul, very very ...

    But why do you use

    MAXPRICE = MAX(D.Price) OVER (PARTITION BY D.DetailKey)

    , i don't understand 😀

  • RE: How to get row value after GROUP BY by MIN or MAX

    Thanks all

    But my boss were change request:

    My solution is very complex huhu

    declare @Header table (

    HeaderKey int NOT NULL

    ...

Viewing 15 posts - 16 through 30 (of 68 total)