General discussion

Locked

Report By Date range, Grouped into days

By bop_zw ·
I am creating a Stored Procedure to query between a given date range as follows:

SELECT
Ksnr as 'Cust No', Artnr as 'Intier No', count(*) as Quantity

FROM
JITWork_Archiv

WHERE
(NOT (Sequenznr LIKE '0%')) AND (Letzte_Prioritaet = 11) AND (Zeitstempel BETWEEN CONVERT(DATETIME, @StartDate, 102) AND CONVERT(DATETIME, @EndDate, 102)) and (NOT( Artnr LIKE 'Dummy'))
Group by Ksnr, Artnr

This works 100%, however I need the result to be by day between 21:40:00 hours and 21:39:59 hours. for a month(Given within the query).

Can someone help?

Thanks

Brian

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums