Forum Replies Created

Viewing 15 posts - 181 through 195 (of 4,080 total)

  • RE: The Bones of SQL - The Holiday Table

    Mr. Snyder, it works like a charm.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: The Bones of SQL - The Holiday Table

    Thanks for sharing that, Mr. Snyder !!

    I'll have to test it out against the Wiki list of Easter Sundays posted HERE.

    Maybe Steve will let me edit the article to...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Can someone try this?

    Thank you, gentlemen. That was driving me bonkers.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Are the posted questions getting worse?

    Okay, I'm at a loss to explain this one. It's a mystery worth looking at.

    http://www.sqlservercentral.com/Forums/Topic1818131-3077-1.aspx

    Edited to add: Although he is showing them as heaps,...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Can someone try this?

    Curiouser and curiouser, your code actually seems to run correctly on my limited testing.

    When there is a date range match and a dup match, a row doesn't display.

    When there is...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Can someone try this?

    Although this is too little too late, you might reconsider that IN clause for the future. Use a non-existence test instead. You'll get the error you expect....

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Can someone try this?

    It didn't return an error for me either. Even with data in both tables.

    Have you reported it to Microsoft?

    You say you fat-fingered it. Did...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: How best to handle non-normalized data

    drew.allen (9/15/2016)


    The Dixie Flatline (9/15/2016)


    What about those two tables is not normalized?

    select p.id, p.FirstName, p.LastName, p.dob, pf.pos,pf.Hobby, pf.Color, pf.SQLConference

    from @Person p

    join @Person_Favorites pf on p.ID = pf.ID

    --where pf.SQLConference like 'SQL%'

    --where...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: How best to handle non-normalized data

    Are you trying to take normalization a step further and create separate tables for possible colors, hobbies, and SQLConferences?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Looking to update old code

    Also, get rid of scalar functions in queries wherever possible. Inline table valued functions perform wayyy better.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Looking to update old code

    If some of your joins are to tables that simply provide descriptions, I'm a big fan of converting those joins to inline table-valued functions. I inherited...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: How best to handle non-normalized data

    What about those two tables is not normalized?

    select p.id, p.FirstName, p.LastName, p.dob, pf.pos,pf.Hobby, pf.Color, pf.SQLConference

    from @Person p

    join @Person_Favorites pf on p.ID = pf.ID

    --where pf.SQLConference like 'SQL%'

    --where color = 'Green'

    where lastname...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: delete millions of rows

    The thing I've realized from this, which should have been obvious, is that when you loop through batches using TOP, you're always doing a table scan from the beginning and...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: SQL Code QA

    I don't think I've ever done a RIGHT JOIN in production. :ermm:

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Split a string on Commas - except when it has a numeric character immediately on either side of it

    Hey, I want a +1 too !!

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 181 through 195 (of 4,080 total)