Forum Replies Created

Viewing 15 posts - 51,481 through 51,495 (of 59,098 total)

  • RE: Four Rules for NULLs

    Matt Miller (3/28/2008)


    Jeff Moden (3/28/2008)


    Bad test, I think, Matt. You would never use 1 = NULL... not sure how that applies.

    I'm drawing a comparison (or rather - highlighting the...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Four Rules for NULLs

    Matt Miller (3/28/2008)


    Jeff Moden (3/28/2008)


    Good article... and I realize it's a couple years old...

    I normally don't work NULLs against "TRUE/FALSE" values even in WHERE clauses... I normally work them against...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Four Rules for NULLs

    ...and so is WHERE <>...

    --===== Now, do a WHERE <> and check the execution plan... INDEX SEEK!!!

    SELECT * FROM jbmtest WHERE RowNum <> 3

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Four Rules for NULLs

    Mike C (2/27/2006)


    Both of which, by the way, are non-SARGable in WHERE clauses...

    ??? :blink: Maybe I'm reading this wrong, but WHERE NOT IN most certainly IS...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: are there "arrays" in sql 2005 ?

    dfalso (3/28/2008)


    blahknow (3/28/2008)


    Hi jeff,

    This is how it works

    "myPhones" is a stored procedure to supply the telemarketing personnel phone numbers to make phone calls.

    phone numbers are stored in various tables of...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Four Rules for NULLs

    Good article... and I realize it's a couple years old...

    I normally don't work NULLs against "TRUE/FALSE" values even in WHERE clauses... I normally work them against some form of data......

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Regarding column value

    vmsbalaji (3/28/2008)


    Hai all,

    Suppose i am having 10 tables in a database.in that 10 tables,5 tables are having the column value as 'cat'.i need 5 tables name alone.more over it must...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Deleting millions rows from some tables

    Here's a couple of facts for you...

    Creating a temp table that holds 750000 rows of primary keys of rows to be deleted takes 2.1 seconds using SELECT/INTO.

    Adding a primary key...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: are there "arrays" in sql 2005 ?

    blahknow (3/25/2008)


    Hi everyone

    My stored procedure accepts 2 parameters: names, number of names like this: (name1, name2, name3,3) Problem is: the number of names changes each time i want to run...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: are there "arrays" in sql 2005 ?

    Mahesh Bote (3/28/2008)


    Better you go for XML.

    A well formed UDF or open code that uses a Tally table to do the split will blow the doors off of any form...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: How to convert char to real to numeric

    If it's for a join, as you say... why are you concerned with converting it back to a number? Just join to it...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: What would you do?Update situation....

    Rather than testing your code on 300 million rows, here's some code that generates a million rows of test data. This particular code also has what I call a...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: PK / FK design question

    Harveysburger (3/27/2008)


    BAM! Jeff has spoken

    gotta say although it's not the most popular answer your arguments are strong

    thanks for the input, I will meditate on that for a while and see...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: PK / FK design question

    John Rowan (3/27/2008)


    Wow, that was great Jeff...thanks. I'll have to admit, I've been just watching this thread waiting for a solid explanation of the benefits of any of the...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: CrossTab Query-URGENT PLEASE!

    erdem (2/28/2008)


    Hello Again,

    How can I prevent duplicate values on a row without using Primary keys?

    For example you can easily see that Sales price2 and sales price3 are same.How can I...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 51,481 through 51,495 (of 59,098 total)