Forum Replies Created

Viewing 15 posts - 1,291 through 1,305 (of 4,080 total)

  • RE: Are the posted questions getting worse?

    Is that why my @@ARID value keeps changing?

    __________________________________________________

    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: Update stats error

    Who are you?

    Who sent you?

    Why are you following us?

    😛

    __________________________________________________

    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: Performace issue using paging feature with ROW_NUMBER function

    As Grant would tell you, it's hard to know for sure without looking at an execution plan. Given an index on [createTimestamp ], the optimizer may be smart enough...

    __________________________________________________

    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 to select two dimensional data

    Second Steve's sentiments about changing the structure of the table. Whether it's called an EAV or a MUCK, that design has been "invented" again and again over...

    __________________________________________________

    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: Optimizing the Query..

    Whups...

    __________________________________________________

    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: Columns to rows

    Here we go, Jeff:

    It is the CROSSTAB of UNPIVOTS

    Is this what we're looking for?

    declare @sample table (ID int identity(1,1), Column1 varchar(10), column2 varchar(10), column3 varchar(10))

    insert into @sample

    select 'row11', 'row12',...

    __________________________________________________

    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: Optimizing the Query..

    It would also be nice to know the volumes in each of the tables involved. What would really help would be an execution plan for this query,...

    __________________________________________________

    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?

    This takes me back to childhood....

    Q: Why did the elephant climb the tree?

    A: To play with his friend, the rhino.

    Q: Why did the elephant sit...

    __________________________________________________

    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: Eliminate Dynamic SQL - WHERE Clause

    The good news is that when you do parameterized dynamic SQL, it can take advantages of existing indexes and views, and even cache a query plan for future use by...

    __________________________________________________

    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: Eliminate Dynamic SQL - WHERE Clause

    Perhaps I'm not explaining clearly enough.

    The comparison to the customer ID is hard coded in the WHERE clause. It has nothing to do...

    __________________________________________________

    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: Eliminate Dynamic SQL - WHERE Clause

    You're welcome Vishal. But looking at your "working" example, what you are doing isn't really dynamic SQL at all. You are assigning a...

    __________________________________________________

    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: Eliminate Dynamic SQL - WHERE Clause

    Agreed. Parameterized dynamic SQL using sp_executesql not only prevents SQL injection attacks, it also provides for execution plan caching.

    __________________________________________________

    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: Eliminate Dynamic SQL - WHERE Clause

    You can't "set a column name" without using dynamic SQL. You can use a CASE expression to choose between two column VALUES, but this could very well cause...

    __________________________________________________

    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?

    GilaMonster (10/4/2010)


    CirquedeSQLeil (10/4/2010)


    GilaMonster (10/4/2010)


    Craig Farrell (10/4/2010)


    Alvin Ramard (10/4/2010)


    GilaMonster (10/4/2010)


    I'm not sure I got the order of operation there correct. Do you check that it's the correct DB before or after...

    __________________________________________________

    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?

    I'd agree, but the duration for drop database is so short there isn't even time to reflect on the meaning of life.

    "Life" the board game, or "Life" the breakfast cereal?

    __________________________________________________

    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 - 1,291 through 1,305 (of 4,080 total)