Viewing 15 posts - 2,611 through 2,625 (of 4,081 total)
Why can't you just test their membership date against the first day of this month?
declare @sample table (member int, memberDate datetime)
insert into @sample
select 1, '7/9/2009' union all
select 2, '7/19/2009'...
August 18, 2009 at 12:39 pm
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...
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...
August 17, 2009 at 3:23 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. ...
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.
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.
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...
August 14, 2009 at 12:58 pm
Be cautious that you don't run into issues with other triggers.
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...
August 14, 2009 at 12:18 pm
It's way better in terms of performance. You won't be sorry.
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. ...
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...
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...
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.
August 14, 2009 at 10:31 am
Viewing 15 posts - 2,611 through 2,625 (of 4,081 total)