Forum Replies Created

Viewing 15 posts - 25,291 through 25,305 (of 59,099 total)

  • RE: Working of the function

    Not that many people would notice but you can get the code to be almost a third faster by eliminating the (-1) subtraction. Last but not least, the simplification...

    --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: The Abstract DBA

    Although I absolutely love the idea of not having to tend the hardware or Windows anymore, I'm still very aware of both and the things that can go wrong as...

    --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: formatting varchar as percentage

    frdrckmitchell7 (11/28/2013)


    Hi Alex

    Unfortunately it does not, hence my question.

    Kind regards

    Understood by why not fix the client side? What is preventing that?

    --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: Zero date.

    ben.brugman (11/29/2013)


    I did understand that the datetime in SQL-server is stored as the number of microseconds / 3 since 1899-12-30.

    If a do a cast I get the more logical result.

    select...

    --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: Happy Thanksgiving 2013

    P Jones (11/29/2013)


    Happy thanksgiving but if you want to get out of the work, go green and cut out the outside lights, thus reducing the ambient light in the rural...

    --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: convert - to datetime

    Minnu (11/29/2013)


    dd

    How rude. It's just totally improper to delete the original post even if things don't work out exactly as you planned.

    If you still need an answer on...

    --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: slow query, speed up with a non clustered index

    keyser soze-308506 (11/27/2013)


    Hi

    I have a query like that

    select c.client_group, s.product_id, count(*) as q

    from Sales s

    inner join Client c on c.client_id= s.client_id

    group by c.client_id, s.product_id

    That code won't actually work at...

    --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: Core T-SQL

    ChrisM@Work (11/28/2013)


    Jeff Moden (11/26/2013)

    As a bit of a sidebar, I especially like the one about "make it work, make it fast, make it pretty" except you left off the 4th...

    --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: Only send DBMail when query results are present

    sqlrd22 (10/15/2012)


    Abu Dina (10/15/2012)


    Okay so something like the below might work for you:

    IF (select count(*) from [e009]) > 0

    begin

    exec msdb.dbo.sp_send_dbmail

    @profile_name = 'Default',

    @recipients = 'me@example.com',

    @subject = 'warning',

    @query = 'select * from...

    --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: Why doesn’t ISNUMERIC work correctly? (SQL Spackle)

    Hey folks, just in case you've gotten lost somewhere along the line on this last bit about collation, allow me to summarize...

    Paul found, Tom confirmed, and I tested that certain...

    --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: Query Output in a text file

    Although I think this post definitely deserves an answer, be aware that the OP might not respond because it is a 3 year old post.

    --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: DBA Resume for US market

    I can't speak for the whole country but I've found that a lot of "System DBA" jobs now require a fairly indepth knowledge of T-SQL. If you have 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: bcp aborts on first FK violation

    bruce.malmat (9/26/2013)


    I want to use BCP to load data from a text file.

    By default, constraints are turned off in bcp, so I use the CHECK_CONSTRAINTS hint.

    bcp aborts if ANY 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: Why doesn’t ISNUMERIC work correctly? (SQL Spackle)

    Jeff Moden (11/27/2013)


    L' Eomot Inversé (11/27/2013)


    In SQL 2012 the fractions are between 0 and 9 in Latin1_General_CI_AS but not in SQL_Latin1_General_CI_AS. It's the same in SQL 2008 R2, and...

    --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: Why doesn’t ISNUMERIC work correctly? (SQL Spackle)

    L' Eomot Inversé (11/27/2013)


    In SQL 2012 the fractions are between 0 and 9 in Latin1_General_CI_AS but not in SQL_Latin1_General_CI_AS. It's the same in SQL 2008 R2, and unless my...

    --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 - 25,291 through 25,305 (of 59,099 total)