diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 80e25a74..63e3f0cb 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -158,7 +158,9 @@ todo: find a way to do a stock picking list format and expose in UI I'm thinking some kind of built in view based on a query that I can treat like a tble object with my existing datalist code //This works with one warehouse, will test with two to see what the what - create view TestStockPickingView as WITH T AS (SELECT *, ROW_NUMBER() OVER(PARTITION BY partid ORDER BY entrydate DESC) AS rn FROM apartinventory) SELECT * FROM T WHERE rn = 1 + create view v as WITH T AS (SELECT *, ROW_NUMBER() OVER(PARTITION BY partid ORDER BY entrydate DESC) AS rn FROM apartinventory) SELECT * FROM T WHERE rn = 1 + + WITH T AS (SELECT *, ROW_NUMBER() OVER(PARTITION BY partid, partwarehouseid ORDER BY entrydate DESC) AS rn FROM apartinventory) SELECT * FROM T WHERE rn = 1 then can just select * from TestStockPickingView and Bob's your lobster