Viewing 15 posts - 14,926 through 14,940 (of 14,952 total)
Actually, you probably want "isnull(I.DeptID, D.DeptID)", and the same for the other field, so that if it's an insert or update, it grabs it from Inserted, and if it's a...
December 14, 2007 at 10:43 am
It seems to me that what you need is a single select statement, and put the complexity in the where statement. You'll end up with a complex execution plan,...
December 14, 2007 at 8:40 am
I'd have to see the actual databases involved to be sure, but most likely the reason for the slow execution is that the generic code requires the database to use...
December 14, 2007 at 8:34 am
delete from table
where c2 < dateadd(day, -30, getdate())
That should do what you need. Set it up to run in Server Agent each day and you should be good to...
December 14, 2007 at 8:21 am
Like others, I'd make sure I had the request in writing, and that it followed standard policy. I'd also consider the person making the request. If happy with...
December 14, 2007 at 7:00 am
Make sure the server and database security settings (including login names) are updated as well. If they contain the domain name, you'll need to update them.
The only other thing...
December 13, 2007 at 3:05 pm
I don't think the amount of space available actually affects the database performance. I could be wrong, but I've never run into any data indicating that would happen, and...
December 13, 2007 at 3:01 pm
If you want the first X rows, use "select top X ..." in your select statement.
If you want to return a range of rows, you'll need to have input parameters...
December 13, 2007 at 12:32 pm
I haven't seen the initial size of a log change before, so I'm not sure what would cause that.
If the actual size changed, then shrinking the database (or the log...
December 13, 2007 at 12:23 pm
select achievetitle, max(periodenddate)
Use that instead of "distinct".
December 13, 2007 at 12:18 pm
As an additional note on my reply, you'll need to add a "distinct" operator to the select statements if an ID can have more than one entry per day, unless...
December 13, 2007 at 10:57 am
select id, coalesce(bbb, mob) as val
from table
where coalesce(bbb, mob) is not null
and date =
(select max(date)
from table t2
where id = table.id
and coalesce(bbb, mob) is not null)
Will get you a set of...
December 13, 2007 at 10:54 am
Instead of an "instead of" trigger, you should use a "for" or "after" trigger (they're the same thing).
Another option is, if the inserts into the main table are handled by...
December 12, 2007 at 1:13 pm
Will simply using "return" (stops execution, doesn't raise an error) work?
December 12, 2007 at 12:56 pm
Viewing 15 posts - 14,926 through 14,940 (of 14,952 total)