Forum Replies Created

Viewing 15 posts - 10,141 through 10,155 (of 14,953 total)

  • RE: Are the posted questions getting worse?

    I noticed that a lot of the pages here slowed down like crazy when the prettier code blocks were added in. There's a script that formats them, and I...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: The T-SQL Paradigm

    I have to admit that I hate single-letter table aliases. I've seen them cause more confusion than I've ever seen them resolve. They're just a way for lazy...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: The T-SQL Paradigm

    YSLGuru (4/3/2009)


    GSquared (4/3/2009)


    T-SQL is clunky in certain regards. For example, why doesn't this work:

    select Col1, count(*)

    from dbo.MyTable;

    SQL Server will raise an error that Col1 is neither contained in a...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Multiple values in one variable

    That's a pretty standard "adjacency hierarchy" and can be resolved in SQL 2005 by a recursive Common Table Expression. If you look up Common Table Expressions (CTEs) in Books...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Performance of user defined functions

    It'll eliminate rows before running the UDF.

    The main problem with UDF performance is that the query optimizer has a rough time estimating rows they'll return, so it assumes it'll be...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: The T-SQL Paradigm

    Yes, the documentation on T-SQL (and pretty much everything else that has to do with anything ever touched by human beings) could stand improvement. In large, major ways. ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Multiple values in one variable

    Can you provide the relevant table structure, some sample data, and a sample of what the output should look like? I'm having a little trouble visualizing what you're describing,...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: The T-SQL Paradigm

    Jason Miller (4/3/2009)


    GSquared (4/3/2009)


    Quite obviously, it is meant to be contained in the Group By, so why not implicitly include it? Sure, that may be a violation of the...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: You have 1,000,000 records in your customers table....

    I have to ask how that solution would be better than an indexed view with a covering index for the query, which is what the first option seems to imply...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    Jeff, I have to admit, I have a terrible tendency to give up on something/someone, then have some thought I just can't hold back on the subject, and feel the...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Help. Cannot create an index into a view

    Can you post the code for that proc? The create script would be best.

    There are parts on the execution plan that lead me to believe it would be possible...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Multi Column Sort

    Another refinement:

    declare @max-2 float;

    select @max-2 = 1.79E+308;

    ;with CTE (CTEID, Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Seq1, Seq2) as

    (select t1.id, t1.Col1, t1.Col2, t1.Col3, t1.Col4, t1.Col5, t1.Col6, t1.Col7, t1.Col8,

    count(*), case...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Multi Column Sort

    Yeah, I realized that about the 9. Was mainly pointing it out because, otherwise, the OP is going to claim your solution can't possibly work, because of it. ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: create a column list in a variable for an IN stmt

    Simple-Talk.com has a pivot workshop by Phil and Robyn that has code for a dynamic pivot in SQL.

    Personally, I view pivots as an application task. Reporting Services, Excel, etc.,...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Urgent HELP...!!!!!!!!!!!

    I'm with Grant on this one. You're going to be better off rebuilding the server than trying to repair it. Faster, and guarantees you aren't leaving any junk...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 10,141 through 10,155 (of 14,953 total)