Forum Replies Created

Viewing 15 posts - 226 through 240 (of 521 total)

  • RE: Multi Column Sort

    jsanborn (4/2/2009)


    Since this was posted for a community of database professionals, I didn't think a great deal of detailed explanation was needed just like I didn't think it necessary to...

  • RE: Multi Column Sort

    GSquared, feel free to increase the 9 to int(max), bigint(max) or anything else.

    I just chose 9 because I felt like this 🙂

  • RE: Unique Constraint for 2 columns in SQL 2005

    Hi arr.nagaraj,

    But you are blocking 11,10 right away for no reason.

    I told the reason already: If order doesnt matter, then 10,11 means the same as 11,10.

    So I allow to store...

  • RE: Multi Column Sort

    Bob, I don't get your sorting.

    You are comparing row1,col1 against row2,col2

    But I really think that what you should do instead is

    (rule 1) compare rowx,coly against rowx,colz (each column against...

  • RE: Multi Column Sort

    Chris Morris (4/2/2009)


    Christian Buettner (4/2/2009)


    Not sure what this is all about, but is this something you would expect?

    SELECT *

    , (SELECT COUNT(*) FROM b

    WHERE ISNULL(col1,0) <= ISNULL(al.col1,9)

    AND ISNULL(col2,0) <=...

  • RE: Multi Column Sort

    Bob Hovious (4/2/2009)


    Mr. Sanborn... have you bothered to test my solution yet?

    Does it work or doesn't it?

    Looks like it doesnt(unless I made a mistake):

    declare @u2bobnoxious table (ID int, Col1...

  • RE: Multi Column Sort

    Not sure what this is all about, but is this something you would expect?

    SELECT *

    , (SELECT COUNT(*) FROM b

    WHERE ISNULL(col1,0) <= ISNULL(al.col1,9)

    AND ISNULL(col2,0) <= ISNULL(al.col2,9)

    AND ISNULL(col3,0) <=...

  • RE: Dynamic SQL

    You can either wrap the TRUNCATE in a stored procedure and call that stored procedure instead, or you can use the solution from Perry:

    Perry (2/15/2006)


    However, you could switch to calling...

  • RE: Unique Constraint for 2 columns in SQL 2005

    Hi arr.nagaraj,

    why do you think it should be allowed?

    If the two columns store the possible combinations of fruit that are sold in a bag, then the order surely doesn't...

  • RE: Applying multiple criteria in a SELECT statement

    Just another option from a logical standpoint (ignoring performance considerations which I doubt to play a role for this type of query, unless it's a monstrous school federation with millions...

  • RE: Unique Constraint for 2 columns in SQL 2005

    arr.nagaraj (4/1/2009)


    insert into t3(n1,n2) values (10,11);

    insert into t3(n2,n1) values (11,10);

    These two statements are semantically the same.

    You probably wanted to write this instead:

    insert into t3(n1,n2) values (10,11);

    insert into t3(n1,n2) values (11,10);

    Another...

  • RE: Fastest way to fetch 10 milion records in a Desktop application that uses SqlServer2005 as Database

    Not sure about this, but it sounds odd to me that a user regularly updates up to 10 million rows.

    Do you have some more details on your table design and...

  • RE: Replication Agents

    That was a very nice explanation, thank you.

    I just wanted to make sure I did not miss anything and will NOT start a long discussion;-)

  • RE: Replication Agents

    Could someone please explain why "Applies data changes to subscribers" is wrong?

    Thanks!

  • RE: How to calculate the Bi-weekly in SQL

    RBarryYoung (12/31/2008)


    Christian Buettner (12/29/2008)


    RBarryYoung (12/29/2008)


    Christian Buettner (12/29/2008)


    Hi RBarryYoung,

    Why do you think it is not a statement terminator?

    Still waiting for your response to my question:

    RBarryYoung (12/28/2008)


    Christian Buettner (12/28/2008)


    I might be nitpicking...

Viewing 15 posts - 226 through 240 (of 521 total)