youngcougar
Programmer
I'm trying to create a start and end date so that I can have a better idea of history.
When I run this query:
SELECT [Item Number], [Item Date], [% OFF MARKED PRICE]
FROM item master file history]
where [item number] like '86%9355'
And [% off marked price] is not null
order by [item number], [Item Date]
I get the following result:
Item number Item Date % off marked price
869000000009355 2006-12-18 00:00:00 70
869000000009355 2007-01-08 00:00:00 80
869000000009355 2007-02-26 00:00:00 90
what I want my data to look like is:
Item Number Start Date End Date % off marked price
869000000009355 2006-12-18 00:00:00 2007-01-07 00:00:00 70
869000000009355 2007-01-08 00:00:00 2007-02-25 00:00:00 80
869000000009355 2007-02-26 00:00:00 getdate() 90
any ideas?
And Thanks!!
When I run this query:
SELECT [Item Number], [Item Date], [% OFF MARKED PRICE]
FROM item master file history]
where [item number] like '86%9355'
And [% off marked price] is not null
order by [item number], [Item Date]
I get the following result:
Item number Item Date % off marked price
869000000009355 2006-12-18 00:00:00 70
869000000009355 2007-01-08 00:00:00 80
869000000009355 2007-02-26 00:00:00 90
what I want my data to look like is:
Item Number Start Date End Date % off marked price
869000000009355 2006-12-18 00:00:00 2007-01-07 00:00:00 70
869000000009355 2007-01-08 00:00:00 2007-02-25 00:00:00 80
869000000009355 2007-02-26 00:00:00 getdate() 90
any ideas?
And Thanks!!