Viewing 15 posts - 76 through 90 (of 371 total)
I chose "1" as the default start value because I thought it would have the same behaviour of the IDENTITY property which defaults to "start with 1, increment 1". Seems...
April 18, 2012 at 9:06 pm
dwain.c (4/18/2012)
DECLARE @startdate DATETIME
SELECT @startdate = DATEADD(year, DATEDIFF(year, 0, '2010-05-31'), 0)
;WITH Dates AS...
April 18, 2012 at 7:54 pm
Thanks for the question.
I think what the author meant was that a FK cannot reference an external database and the explanation says there is a way to SIMULATE a FK...
April 7, 2012 at 11:32 pm
ggjjbb1983 (4/5/2012)
Is there any reason why a sample scan would be performed instead of a full scan?
I may be guessing it wrong here but maybe it's because a statistics update...
April 5, 2012 at 10:42 am
After reading through the excellent debate around views last week, I was sure what to answer even though there were few answers to choose this time. Thank you for making...
April 3, 2012 at 9:10 am
Also Lutz' solution is probably easier to understand and maitain with that OUTER APPLY. ๐
April 1, 2012 at 9:08 am
How about something like this:
SELECT X.Description,
X.DueDate,
X.Colour
FROM (SELECT ROW_NUMBER() OVER (PARTITION BY T.Description ORDER BY...
April 1, 2012 at 8:33 am
@alex: indeed. In my last job, views were used everywhere but they were not schema bound. I talked them into using that option whenever new objects were created and we...
April 1, 2012 at 6:53 am
L' Eomot Inversรฉ (3/29/2012)
March 31, 2012 at 8:49 am
Thanks a lot for the detailed explanation!
I got confused thinking that ORDER BY 0 or 1 was about the column order like in:
SELECT TOP(10) name, type FROM sys.objects ORDER BY...
March 30, 2012 at 6:57 am
If I get this right and you want to run this without creating the procedure, you'll need to declare the variables that are passed as parameters to the procedure.
DECLARE
@run_mode NVARCHAR(12)...
March 30, 2012 at 5:57 am
Mark-101232 (3/30/2012)
with cte as (
select stageid,stagestatustypeid, applictaionid,
row_number() over(partition by applictaionid order by case when stagestatustypeid<>1 then 0 else 1 end,stageid desc) as rn
from...
March 30, 2012 at 5:46 am
Jeff Moden (3/29/2012)
I love this forum and this community....
March 29, 2012 at 7:10 pm
Hi, Jeff.
Indeed. I was at work and couldn't test it properly.
I should've noticed that the IN clause may bring results from either A OR B. ๐
That's an excellent article by...
March 29, 2012 at 6:51 pm
Viewing 15 posts - 76 through 90 (of 371 total)