686 reputation
417
bio website stackoverflow.com
location New York, NY
age 37
visits member for 3 years, 2 months
seen Feb 19 '13 at 16:24

Apr
1
awarded  Popular Question
Feb
19
awarded  Popular Question
Jan
24
awarded  Yearling
Dec
28
awarded  Notable Question
Nov
7
awarded  Popular Question
Oct
7
awarded  Popular Question
Oct
3
awarded  Popular Question
May
30
awarded  Popular Question
Feb
1
asked Get counts grouped by month and year
Jan
24
awarded  Yearling
Dec
27
awarded  Popular Question
Dec
3
comment Can this SQL be made more efficient and combined into one select?
fyi; i up-voded the answer as it was pretty helpful. (question poster)
Nov
29
comment Can this SQL be made more efficient and combined into one select?
nice solution, and the bullet points are most helpful! thanks
Nov
29
accepted Can this SQL be made more efficient and combined into one select?
Nov
29
comment Can this SQL be made more efficient and combined into one select?
im getting and error on line ", tmp_Sent_to_smc AS" but trying each of the selects individually works fine.
Nov
29
asked Can this SQL be made more efficient and combined into one select?
Nov
28
accepted how to get avg() size by day using two decimal places
Nov
28
comment how to get avg() size by day using two decimal places
still im not getting two decimal places with this code. i changed the sql to fix this: SELECT [date_only] = CONVERT(DATE, InsertedDateTime) ,[Tally] = COUNT() ,avgSize = CONVERT(DECIMAL(10, 2),AVG( size/1024.0/1024) ) ,[daily MB gorwth] = COUNT() * CONVERT(DECIMAL(10, 2),AVG( size/1024.0/1024) ) FROM dbo.attachmentdetail WHERE isinline <> 1 GROUP BY CONVERT(DATE, InsertedDateTime) ORDER BY [date_only] DESC;
Nov
28
comment how to get avg() size by day using two decimal places
thanks, i started with the cast to decimal to avoid an overrun of the integer datatype of the size field... my math was failing.
Nov
28
asked how to get avg() size by day using two decimal places