Viewing 15 posts - 361 through 375 (of 424 total)
The CTE suggestion is really no different than our existing temp table technique. The problem is it still has to calculate the ranked metric for the entire dataset and...
February 4, 2008 at 8:26 am
select T.*
from yourTable T
join yourTable T2 on T.user_id = T2.user_id
and dateadd( hour, 1, T.punch_out ) = T2.punch_in
February 1, 2008 at 2:34 pm
also consider eliminating the month(), date(), year() comparisons
SELECT COUNT(tblConferences.Division) AS Total,
tblConferences.Subdivision, tblConfAtt.ConfDate,tblConfAtt.CustomerID
FROM tblConfAtt
INNER JOIN tblConferences
ON tblConfAtt.Conference = tblConferences.Room...
January 31, 2008 at 10:33 am
also take a look at sybase powerdesigner.
January 31, 2008 at 10:02 am
try rounding both datetimes.
select '11:29',
dateadd(minute,
round(cast(datediff(minute, 0, '11:29') as float) / 60,0) * 60, 0)
January 31, 2008 at 9:58 am
Select ...
,(SELECT DISTINCT b1.FirstName + ' ' + b1.LastName FROM dbo.consultant
LEFT OUTER JOIN dbo.uvwConsultantDownLine AS B1 ON D.SponsorID = B1.ConsultantID) AS SponsorName
,D.SponsorID
...
from #Downline D with (nolock)
LEFT OUTER JOIN uvw_DownlineOrder O...
January 31, 2008 at 7:05 am
, (SELECT DISTINCT b1.FirstName + ' ' + b1.LastName
FROM dbo.consultant
LEFT OUTER JOIN dbo.uvwConsultantDownLine AS B1
ON D.SponsorID = B1.ConsultantID) AS SponsorName
the left outer...
January 30, 2008 at 4:18 pm
Yeah, agreed, except that I don't want it to 'try to figure out'. Thanks, guys, for the verification it's not a bug. I still don't like it though. I'm just...
January 30, 2008 at 4:08 pm
Hey, SSCrazy. That sounds good except that now I have to question the design. You're right that the alias makes it fail correctly ( isn't that ironic? You have...
January 30, 2008 at 2:55 pm
thanks again todd. i'm somewhat skeptical about what naysayers that never use a feature say about a feature.
them: "it's awful, i never use it for...
January 29, 2008 at 7:44 am
hey todd. thanks for the feedback. when i give a suggestion i don't always put on my qa hat as i just want to help someone down the road...
January 28, 2008 at 8:04 am
just convert getdate() to an int and leave run_date alone:
cast(convert(char(8),getdate(),112) as int)
January 27, 2008 at 9:38 am
sorry the comparison should be TimeStamp >= date expression
run these statements:
select dateadd(month, -12,
dateadd(day,1 - day(getdate()),
...
January 26, 2008 at 6:27 pm
WHERE TimeDateStamp
BETWEEN DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)
AND
DATEADD(ms,-3,DATEADD(mm,DATEDIFF(m,0,getdate()) +1, 0))
try this instead:
where TimeDateStamp <=
dateadd(month, -12,
dateadd(day,1 - day(getdate()),
convert(char(10),getdate(),120)
...
January 26, 2008 at 6:03 pm
i've read that the drawback of row_number() is that it must be calculated for the entire partition of the over() clause and thus usually results in higher io. anyone...
January 26, 2008 at 5:51 pm
Viewing 15 posts - 361 through 375 (of 424 total)