Viewing 3 posts - 1 through 3 (of 3 total)
You could as well use MAX and Group by... it should work 🙂
SELECT ID,MAX(COUNTER) COUNTER, DATA FROM TABLE
WHERE daterange between date1 and date2
GROUP BY ID,DATA
April 2, 2014 at 8:03 am
Modified Smash125's code a bit so that the order is sequential and eliminated the use of case in CTE.
WITH C AS(
select
year(OrderDate) AS OrderYear,
MonthForTheYear= DateName(month,DateAdd(month,Month(OrderDate),0)-1),
Quarter = CASE WHEN MONTH(OrderDate) BETWEEN 1...
June 6, 2012 at 7:14 am
You could probably call sqlpubwiz with xp_cmdshell (in a stored proc) and run it as a scheduled job..
for more info check this site out...
June 6, 2012 at 6:25 am
Viewing 3 posts - 1 through 3 (of 3 total)