Forum Replies Created

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

  • RE: Split one row into two rows using CTE??

    Peter Brinkhaus (8/12/2012)


    Assuming that the TradeID column is unique (primary key?), why not use a UNION ALL instead of UNION. This avoids a (expensive) distinct sort to filter out nonexisting...

  • RE: Problem Using subquery and join

    Luis Cazares (8/8/2012)


    I believe there's a problem with your sample data because there's not to much matches (only 19)

    However, you might find useful to use a CTE with the ranking...

  • RE: Problem Using subquery and join

    i'm sorry for not describe it clearly. What i want is exactly same like query that i made before that i made before

    SELECT

    test2.*,

    sellerFirstName = (SELECT TOP 1 test1.FirstName FROM #test_table1...

  • RE: DTS Package call from ASP.Net give different result than manual execution

    Robin Sasson (5/1/2012)


    Are you passing any parameters from the .NET application to the DTS package?

    If not then I suspect the issue is at the SQL Server.

    If you are passing a...

  • RE: Comparing data row by row....

    Hi Paul,

    Sorry for not respond for a few days....

    It takes a time for me to learn your solution,cause i'm new to many sql server keywords such as ROW_NUMBER and partition,...

  • RE: Comparing data row by row....

    ChrisM@home (1/15/2012)


    martin.david (1/15/2012)


    ChrisM@home (1/15/2012)


    Hi Martin

    By "sequence in data" - do you mean sequence by ID?

    Cheers

    Hi,

    i'm sorry, maybe i'm using wrong word for my problem..

    sequence that i mean is same transaction...

  • RE: Comparing data row by row....

    ChrisM@home (1/15/2012)


    Hi Martin

    By "sequence in data" - do you mean sequence by ID?

    Cheers

    Hi,

    i'm sorry, maybe i'm using wrong word for my problem..

    sequence that i mean is same transaction that occur...

  • RE: Comparing data row by row....

    ChrisM@home (1/14/2012)


    Blimey! First post, and you've set up a ton of sample data! Top work!

    I think this is what you're looking for:

    SELECT

    Date,

    Price,

    AskClient,

    Dupes = COUNT(*)

    FROM #trading

    GROUP...

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