Forum Replies Created

Viewing 15 posts - 31,546 through 31,560 (of 59,101 total)

  • RE: Are the posted questions getting worse?

    Ninja's_RGR'us (12/30/2011)


    2011 was the year of the Monster, wonder how she can beat that next year :-D.

    Boy, I'll say! Nicely done, Gail!

    Happy New Year, everyone!

    --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: Primary Keys are necessary for good database design

    IMHO, Kimberly Tripp gives the most compelling reason to use an Integer-based PK and why it should usually be the the Clustered Index... performance. Please see the "movie" 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: Problem with a simple Scalar UDF

    SQL Kiwi (12/30/2011)


    drew.allen (12/30/2011)


    Naming conventions are simply conventions. There is no right or wrong. As long as they are consistent and meaningful, it doesn't really matter exactly what...

    --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: Problem with a simple Scalar UDF

    Welsh Corgi (12/29/2011)


    I'm having a problem with a simple Scalar UDF.

    As ALZDBA suggested and Paul backed up, you should use an iTVF (Inline Table Valued Function) for this (unless you...

    --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: Problem with a simple Scalar UDF

    drew.allen (12/30/2011)


    CELKO (12/30/2011)


    A function or a procedure is names with <verb>_<object> and does not have the meta-data like “udf_”; name things for what they are, not how they are implemented....

    --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: Recursive loop

    ssc_san (12/30/2011)


    Thanks you Jeff!

    You bet. Thank you for taking the time for the feedback. 🙂

    --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: Recursive loop

    mhike2hale (12/28/2011)


    How about this?

    --::Create a tally table---------------------------

    select top 1000 identity(int, 1,1)[N]

    into #tempTally

    from master..syscolumns a, master..syscolumns b

    --::Do the trick here------------------------------

    select 'ABC' + convert(varchar(2),N)

    from #tempTally

    where N < 6

    ---------------------------------------------------

    You can check Jeff Moden[/url]'s...

    --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: Recursive loop

    CELKO (12/30/2011)


    We get data from the outside world; we do not like to create it. We go to that world and use a procedural language to build the 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: Recursive loop

    ChrisM@home (12/30/2011)


    Jeff Moden (12/30/2011)


    malleswarareddy_m (12/30/2011)


    Hi,

    with cte this code will work fine.

    with cte as

    (select 1 as i

    union all

    select i+1 from cte where i<5

    )

    select 'ABC'+CAST(i as varchar) from cte

    Please read the following...

    --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 loading of flat file data

    @koushikchandra,

    Are you all set or do you still need help with this?

    --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 get seconds from my time ....

    VIG (12/30/2011)


    DECLARE @time TIME = '20:10:10'

    select total_seconds =DATEDIFF(second,0,cast(@time as datetime))

    😉

    --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: Recursive loop

    malleswarareddy_m (12/30/2011)


    Hi,

    with cte this code will work fine.

    with cte as

    (select 1 as i

    union all

    select i+1 from cte where i<5

    )

    select 'ABC'+CAST(i as varchar) from cte

    Please read the following article for why...

    --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: Equivalant of "Left Join" but in XML

    Interesting... I didn't realize you could reference the "/@" level that way. I'll have to give that a try because, if it works, it'll simplify the code 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: Query Tuning

    SQL Kiwi (12/28/2011)


    (and no-one reads these comments anyway :-))

    Just the important ones. 🙂 Glad you and Hugo stopped by. I made a pretty bad mistake by missing...

    --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 Tuning

    My most sincere apologies folks. Hugo and Paul are correct. I missed my own NOT NULL constraint on the StartDate column. I'm sending an email to SSC...

    --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 - 31,546 through 31,560 (of 59,101 total)