Forum Replies Created

Viewing 15 posts - 106 through 120 (of 582 total)

  • RE: @Local_Variable 8k Limit

    declare

    @null varchar, @concat varchar(8000)

    --

    exec

    ('select ''first try''' + @null

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Bank Holiday issues

    It sounds like you are overwriting the data every night. You could retain data from the previous Monday, so people can query 'previous week' as well as 'week to date'.

    (might they not...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Easiest query to find start of month

    I have advice for egg collectors. Stop killing off rare species.

    For those who don't know, the saying is an old one, and refers to sucking eggs for food, a...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Rewriting an update statement without using a cursor

    Nearly there, but you don't and never did need the left join (Jeff!). Your initialisation query may be once only, but the minatenance of the data isn't once only, is it. The web...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: An oppertunity to get a new SQL Comparison tool for free

    Don't reply to these except when first posted (or freshly replied to). It puts them back at the top of the list.

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Functions with internal Sorting - is it cached?

    You are right that each time the function is called, it will undertake a sort operation.

    I'll reiterate. The sort process involves only a small number of 'child' records (as restricted...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: rotate a table

    >he knows all the columns, I do not. It will be passed into procedure and vary at all the time.

    Eric knows the columns in the 'before' recordset, but not the...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Primary Key Column

    /*this is designed for v8, but written on v9.
    I'm fairly certain it's v8-compatible.*/
    --

    select

    u.name tabowner

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: @Local_Variable 8k Limit

    BTW, surprisingly but conveniently, "+" used in the EXEC() function (unlike, say, the LEN() function) is a param delimiter, not a concatenation operator!

    declare

    @null

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Identifying which schedule initiated Job to run

    sysjobservers must have been a view on MSDB tables. I can't be sure because I haven't got a SQL8 instance to hand. See what I mean about it being easier...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: How does one select EVERY Nth row from a table?

    If you literally want precisely every Nth row, then you would also need to do something similar to Ryan's suggestion if the table with the identity column has had deletions.

    If you...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Identifying which schedule initiated Job to run

    You can get that info from poking around in MSDB.

    But it might be easier and the code clearer just to have table which the monthly proc writes to, specifying the...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Updating rows in table from Select query

    You only need the nested inline views (derived tables) because you are using

    (select 'A' as col1, 101 as col3

    union all select 'B', 203

    union all select 'C', 204

    union...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: rotate a table

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=291926

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Create procedure conditionally

    A person might have an environment which contains new versions of a only a subset of the procedures required. Perhaps only the procs from a particular functional area of a db app exist...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • Viewing 15 posts - 106 through 120 (of 582 total)