Viewing 15 posts - 2,611 through 2,625 (of 4,080 total)
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
August 17, 2009 at 4:57 pm
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
August 17, 2009 at 3:23 pm
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
August 14, 2009 at 2:49 pm
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
August 14, 2009 at 1:44 pm
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
August 14, 2009 at 1:36 pm
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
August 14, 2009 at 1:28 pm
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
August 14, 2009 at 12:58 pm
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
August 14, 2009 at 12:56 pm
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
August 14, 2009 at 12:18 pm
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
August 14, 2009 at 12:15 pm
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
August 14, 2009 at 12:03 pm
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
August 14, 2009 at 11:19 am
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
August 14, 2009 at 10:34 am
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
August 14, 2009 at 10:31 am
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
August 13, 2009 at 2:54 pm
Viewing 15 posts - 2,611 through 2,625 (of 4,080 total)