i have procedure like this
select count(*),sum(Transaction_Amount),dateadd(hour, datediff(hour, 0, Created_On), 0),convert(nvarchar(10),Created_On ,105) from Collect_Transaction
where convert(nvarchar(10),Created_On ,101)
between @Date_From and @Date_To
group by dateadd(hour, datediff(hour, 0, Created_On), 0),convert(nvarchar(10),Created_On ,105)
order by dateadd(hour, datediff(hour, 0, Created_On), 0),convert(nvarchar(10),Created_On ,105)


but it displays time when it has an entry . but when it does not have an entry . no rows are displayed how do you displayan entry there

You should do that in your back-end coding, instead of trying to put it in your query.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.