Last post Nov 07, 2012 12:09 AM by Ajay2707
Nov 04, 2012 01:12 AM|Oman88|LINK
i want to generate a report where the details are related to future date and time.
how i can do that??
Nov 04, 2012 02:14 AM|AL MUBARAK|LINK
Can you please ellaborate your needs.?? how you want future date and time should be..?? what are the reports..??
Nov 04, 2012 03:04 AM|Oman88|LINK
it is a report shoing the shift details for each employee
the details should be related to the coming day not in the past one.
i hope that it is clear ^_^
Nov 05, 2012 02:32 AM|Ajay2707|LINK
For your need , you make a sp which gives you the data. I'll show you as
select cast('05 jan 2011' as datetime) as DT, 1 as val into #t
union all select CAST('05 jan 2011' as datetime), 1
union all select CAST('29 jan 2011' as datetime), 1
declare @start datetime = '01 jan 2011'
declare @end datetime = dateadd(day, 29, @start)
;with amonth(day) as
select @start as day
select day + 1
where day < @end
select amonth.day, count(val)
left join #t on #t.DT = amonth.day
group by amonth.day
After this sp you can merge your column with dateoutput. Now you whole data is set in db. you just through in report.
Nov 05, 2012 02:35 AM|graciax8|LINK
what output do you want? please post codes you have right now.
Nov 06, 2012 12:44 AM|Oman88|LINK
can i do it by SQL expression???
Nov 07, 2012 12:09 AM|Ajay2707|LINK
or you can check your post