Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SQL Function

$
0
0

SELECT 
DATEADD(minute,(DATEDIFF(minute,DayStart,[DateTime])/5)*5,DayStart) AS
FiveMinutes, Val

FROM (SELECT *,
DATEADD(day,DATEDIFF(day,0,[DateTime]),0) as DayStart
FROM table1) as A

I would like to Show Val using AVG Function ...

pls help me


Shwe Nann Thu


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>