Forum Replies Created

Viewing 15 posts - 2,611 through 2,625 (of 4,080 total)

  • RE: Business Days in sql

    If you include weekends with holidays in your holiday table, the following query works.

    -- New year's Day, 2009 example

    declare @startDate datetime

    set @startDate = '1/5/2009' -- Monday

    declare @backupDays int

    set @backupDays...

    __________________________________________________

    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: Stored Procedure - Error Trap

    I am puzzled by your statement that the procedure continues to run, producing unexpected results. In the absence of try/catch logic, when I force the same 2714 message...

    __________________________________________________

    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: Syntax for altering all databases?

    You're welcome, and good luck.

    __________________________________________________

    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: Recursive AFTER INSERT trigger: is it possible ?

    I'm talking about a query in the trigger itself. I understand that your user should only see/select "KIT" and then everything else happens under the covers. ...

    __________________________________________________

    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: Syntax for altering all databases?

    Just generate that statement for all the databases on the server.

    select 'ALTER DATABASE '+name +' SET RECOVERY SIMPLE GO'

    from sys.databases

    You may want to filter out master, tempdb, etc.

    __________________________________________________

    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: Get products ordered by category order

    Lucky, could you show us some sample data and then the expected output? I'm not sure I understand your question from what you put in the initial post.

    __________________________________________________

    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: Recursive AFTER INSERT trigger: is it possible ?

    My question is: why you don't just generate the entire set of rows to be inserted along with the KIT and then insert them without launching the trigger over 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: Recursive AFTER INSERT trigger: is it possible ?

    Be cautious that you don't run into issues with other triggers.

    __________________________________________________

    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?

    How about a phone company that doesn't throw the switch to your new address when you move to a new home (while keeping your old number), then transfers your call...

    __________________________________________________

    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: Linked Server Subquery/Left Outer Join Issue

    It's way better in terms of performance. You won't be sorry.

    __________________________________________________

    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: Linked Server Subquery/Left Outer Join Issue

    I don't know about the error message because as a general principle I NEVER join tables across servers. Even when it works, the performance just crawls. ...

    __________________________________________________

    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: ExecuteSQL result into a variable?

    You can catch the output in a table variable, and then select it into your variable from the table variable.

    Inelegant, but effective.

    declare @sql nchar(4000)

    declare @catchtable table...

    __________________________________________________

    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: Turn rows into columns

    Since you don't know how many column names there will be in advance, you must do it all with dynamic SQL. Essentially, you pull a list of...

    __________________________________________________

    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: help using the TOP command in sql

    It's not all that complex.

    A cte with row_number(), read by a WHERE clause using BETWEEN should get the job done.

    __________________________________________________

    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 think the worst questions are getting posted.

    Have to sign off now and ride 1.5 hours to have pizza with Alvin at MemPASS.

    __________________________________________________

    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 - 2,611 through 2,625 (of 4,080 total)