Viewing 15 posts - 13,426 through 13,440 (of 14,953 total)
SQL Server queries are not "deterministic" in terms of their execution plans.
First thing I'd do is rewrite that query a bit, then I'd worry about different execution plans AFTER I'd...
June 9, 2008 at 8:36 am
For accurate counts of weekdays, I HIGHLY recommend a calendar table. That way, you can include holidays, etc.
create table Calendar (
Date datetime primary key,
constraint CK_Date_NoTime
check (Date...
June 9, 2008 at 8:20 am
Not precisely. Are you querying the view, or connecting the client directly to the view?
If querying the view, yes, the Order By (or lack thereof) of the calling query...
June 9, 2008 at 7:58 am
Welllllllll .... the post is certainly appropos of the title ....
June 9, 2008 at 7:54 am
As always, I'm going to recommend not doing pivoting in the database. Let a front-end application do it for you. They're better at it. SQL Server Reporting...
June 9, 2008 at 7:46 am
I'd go with bigint rather than numeric for an ID column. If you somehow find you need more rows than bigint can deal with, you're probably better off with...
June 9, 2008 at 7:43 am
Order By works in views in SQL 2005. Are you using column aliases in the Select clause? Do you have two columns in the view with the same...
June 9, 2008 at 7:37 am
Try these:
;with MaxRain (DT, MID, Rainfall) as -- Max Rainfall per Day
(select date_taken, main_id, max(daily_rainfall)
from dbo.SEL
group by date_taken, main_id)
select Date_Taken, Main_ID, Time, Rainfall
from dbo.SEL
inner join MaxRain
on date_taken = dt
and main_id...
June 9, 2008 at 7:33 am
This is a duplicate thread. Thread of same name and question in Administering forum. Please don't double-post.
June 9, 2008 at 6:54 am
I don't understand your request. Are you asking about a trigger for when you attach a database?
June 9, 2008 at 6:52 am
The key to Michael's answer is "scope_identity()". Look at that one in Books Online. Very useful tool.
June 9, 2008 at 6:51 am
To attach a database, check out Create Database in Books Online. There's a "for attach" argument you can use.
June 9, 2008 at 6:49 am
Easily-managed row-level security would be nice. I've generally ended up using hierarchies of accounts for that kind of thing.
I haven't dug into service broker at all. It's not...
June 9, 2008 at 6:46 am
margo (6/9/2008)
One thing I would add to the downside of "passive" audits... the cost of keeping...
June 9, 2008 at 6:37 am
CPU time is how much time was spent by the CPU (or CPUs). Total time is how long it took from start to finish.
For example, if it takes 1...
June 6, 2008 at 2:43 pm
Viewing 15 posts - 13,426 through 13,440 (of 14,953 total)