Viewing 15 posts - 1,771 through 1,785 (of 1,824 total)
There really is not a simple answer , but its all down to understanding the query plan.
Heres a link to an ebook on the subject.
July 2, 2009 at 3:06 am
July 2, 2009 at 2:33 am
In that case you could try inserting to a temp table with an identity column rather than using row_number(). Havent tried it myself but no reason why it shouldnt...
July 2, 2009 at 1:25 am
Hi ,
see my blog here for an article on analysing contiguous ranges.
July 2, 2009 at 1:09 am
My personal option would be
DECLARE @Date1 DATETIME, @Date2 DATETIME, @Date3 DATETIME, @Date4 DATETIME
SET @Date1 = '1991/06/01'
SET @Date2 = '1991/06/29'
SET @Date3 = '1991/08/01'
SET @Date4 = '1991/09/04'
;with CteDates(Dates)
as
(
Select @Date1 union Select...
July 1, 2009 at 6:18 am
Which part are you particularly needing help with the cte (common table expression ) or row_number() ?
Google is your friend ...
Also
it not work for high numbers
If will work for as...
July 1, 2009 at 5:45 am
The error is happening as @Date1 is out of scope inside the dynamic sql statement.
There are a few potential solutions i can think of , but how are you receiving...
July 1, 2009 at 5:43 am
Assuming 2005 +
create table ali
(
code varchar(16),
fromcol integer,
toCol integer
)
go
insert into ali values('ali1',1,5)
insert into ali values('ali2',6,15)
go
with ctenumber(rownum)
as
(
Select rownum = row_number() over(order by id)
from...
July 1, 2009 at 4:03 am
SQLSlammer (7/1/2009)
Dave Ballantyne, well if you're not Scottish and you didn't work in Hemel Hempsted then it's definitely not you 🙂
No to both counts on that one 🙂 , or...
July 1, 2009 at 3:54 am
First use SQLProfiler to find out which query is long running.
http://www.developer.com/db/article.php/3482216
Then see gails article on how to post performance issues
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
It will stop all the guess work
July 1, 2009 at 3:14 am
I dont think you can do that with DRI , but one solution is :
Create Trigger COACH_DEL on COACH for delete
as
Update TEAMTab
set Coach = NULL
from...
June 30, 2009 at 3:41 am
SQLSlammer (6/25/2009)
Some jumped up new DBA decided that too many people had sysadmin permissions, so he started revoking permissions..including yours....ring any bells? hehe
You really must be thinking of someone else,...
June 25, 2009 at 11:02 am
Ok now i really read you post with you..
SqlSlammer: Small world, cant say i remember are specific permissions issue though :ermm:
June 25, 2009 at 9:35 am
DCPeterson (6/25/2009)
A clustered index is ALWAYS unique.
Not true. By way of demonstration...
drop table t1
go
Create table t1
(
col1 integer)
go
create clustered index idxt1 on t1(col1)
go
insert into t1 values(1)
insert into...
June 25, 2009 at 9:20 am
Viewing 15 posts - 1,771 through 1,785 (of 1,824 total)