I have been trying to setup a running date difference (DAY) query for this table that resets on StockCode Change but with little luck as I have been trying to modify a running sum one I use...
Can anyone help
Data example
Can anyone help
Code:
SELECT RowNum, StockCode, ReqDate
FROM temp6
Data example
Code:
47 E0038 04/05/2007 10:02:00
48 E0038 07/05/2007
49 E0038 19/05/2007
50 E0039 04/05/2007 10:02:00
51 E0040 04/05/2007 10:02:00
52 E0041 04/05/2007 10:02:00
53 E0042 04/05/2007 10:02:00
54 E0043 04/05/2007 10:02:00
55 E0044 04/05/2007 10:02:00
56 E0045 04/05/2007 10:02:00
57 E0104 04/05/2007
58 E0104 04/05/2007 10:02:00
59 E0104 07/05/2007
60 E0104 18/05/2007