Viewing 15 posts - 1,111 through 1,125 (of 1,995 total)
sqlbee19 (5/23/2012)
----------------------------
set nocount on
declare @role varchar(255),@dbname varchar(255)
declare @rowid int
declare @user nvarchar(255)
declare @cmd varchar(8000)
set @dbname = 'Mydatabasedashboardaaaaaaaaa1111'
set @role = 'db_owner'...
May 23, 2012 at 9:46 am
you need to use a ranking function to find the first instance of a value
see my example below
select x.* from
(
select id,name,ROW_NUMBER() over (partition by id order by name asc)...
May 23, 2012 at 9:37 am
Steve Jones - SSC Editor (5/23/2012)
Mr or Mrs or Miss or Ms 500
Too long, and to be honest, didn't think about it. Plus, could you get to 500...
May 23, 2012 at 9:30 am
lucky it's a test box
May 23, 2012 at 9:28 am
+1 howard beat me to it, but slightly different solution
May 23, 2012 at 9:27 am
derek.colley (5/23/2012)
As a sometime dev who is used to loops (go VBScript go!) and more 'traditional'...
May 23, 2012 at 9:25 am
in that same database there was a checkpoint that seemed to have hung - looks like that was the issue - the checkpoint was doing nothing and had been for...
May 23, 2012 at 8:11 am
computed and PERSISTED would be even better
May 23, 2012 at 8:04 am
To answer your question, absolutely not. And that's why this problem won't be fixed until it becomes a real problem. It's also very typical. It's the reason...
May 23, 2012 at 7:30 am
Of course, that's also why I generally don't allow XML in any of my databases. 😀
Amen to that - praise be to edgar F codd and Raymond F Boyce!!!!!
May 23, 2012 at 7:24 am
alter the CTE to be as follows
with x (mon,monid,monthord) as
(select DATENAME(month,1) as month,1 as monid,1 as monthord
UNION ALL
select DATENAME(month,X.monid+31) as month,X.monid+31 as monid,x.monthord+1 as monthord from x
where monid<=311
)
now you have...
May 23, 2012 at 7:20 am
krypto69 (5/23/2012)
I was thinking about log shipping...My intial google - seems like log shipping is kinda a bitch to setup?
not really - in sql 2000 it was an enterprise edition...
May 23, 2012 at 6:43 am
hmm
but the funny thing is that yesterday the query was working fine.... what can have changed to make the showcontig stall ?
May 23, 2012 at 6:40 am
i simplified the code just to match the CTE i wrote for you, but it would look a little like this
with x (mon,monid) as
(select DATENAME(month,1) as month,1 as monid
UNION...
May 23, 2012 at 5:39 am
sanujss (5/23/2012)
I am working on a GPS related issue. There is a table where we keep geographical information of vehicles tracked using GPS devices. This devise will be sending...
May 23, 2012 at 5:23 am
Viewing 15 posts - 1,111 through 1,125 (of 1,995 total)