Viewing 15 posts - 21,046 through 21,060 (of 59,098 total)
acrutchley (4/16/2015)
I did try the ISO_WEEK option but I was still getting overlaps with the months.... which caused duplicate week number entries because I was grouping by the month...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2015 at 3:45 pm
acrutchley (4/16/2015)
Many thanks for your response, I agree the calendar approach would be the best. However, due to time constraints I have managed to get round the issue...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2015 at 8:41 am
Using your original idea, just add a bit of code to detect if there's an identity column or not. If there is, then use the SET IDENTITY_INSERT command to...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 16, 2015 at 8:28 am
Only the clustered index has anything to do with the actual data in the table. NCIs are their own ball of wax and won't affect any data.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2015 at 10:31 pm
kiran.sharc (4/15/2015)
I am new to SQL DBA world and looking for the SQL DBA scripts which frequently use. My apologies which...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2015 at 10:19 pm
itsgaurav (4/15/2015)
I have a five rows such AS
pd_id pd_name
11 Prod-1
22 ...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2015 at 9:43 pm
We have stringent rules at work for the promotion of all code. It doesn't change at all just because there's a "data emergency" of the nature you speak except...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2015 at 9:37 pm
ztoddw (4/14/2015)
declare @STRING varchar(1000);set @STRING='100010111100010001';
select pos=ltrim(str(n))+'-'+ltrim(str(len(sub)-len(ltrim(replace(replace(sub,' ','~'),'0',' ')))+n-1))
from (select n=number, sub=substring(@STRING,number,len(@STRING))
from master.dbo.spt_values where type='P'
and (number between 1 and len(@STRING))) t
where (n=1 or substring(@STRING,n-1,1)<>'0')
and...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2015 at 11:11 pm
Shifting gears a bit, I really miss HS-LASD (Hot Swappable Large Arrays of Small Disks) with a really good controller. Not only could you split MDF/LDF and TempDB, you...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2015 at 12:09 pm
sKreetz! (4/14/2015)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2015 at 11:53 am
Agreed. That's why I asked for some real test data. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2015 at 11:24 am
To add to what Sean posted, you should never do "just" a DELETE because you don't know what to expect. You should always do a SELECT first to see...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2015 at 10:59 am
skilly2 (4/14/2015)
Jeff Moden (4/13/2015)
http://www.sqlservercentral.com/articles/T-SQL/63681/
As a...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2015 at 9:29 am
Enumerate each value with ROW_NUMBER() and do a +1 offset self join. Then look for where the "lo" value is greater than the "hi" value (the +1 rownumber). ...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2015 at 8:58 am
Heh... as a bit of a sidebar, when there's a failure, I "SPAM" folks every 2 minutes to establish a sense of urgency. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2015 at 8:23 am
Viewing 15 posts - 21,046 through 21,060 (of 59,098 total)