When I run it, the table looks like this:
Expand|Select|Wrap|Line Numbers
- Vendor | VendorPriority | SKU | Date
- ASDF | 1 | 123 | 140703
- ASDF | 2 | 154 | 140703
- ASDF | 1 | 541 | 140703
- FDSA | 1 | 454 | 140703
- FDSA | 1 | 210 | 140703
- ASDF | 3 | 478 | 140703
- FDSA | 2 | 142 | 140703
Expand|Select|Wrap|Line Numbers
- SELECT t1.Vendor, t1.VendorPriority, t1.SKU, t1.Date
- FROM tblVendorItems AS t1, (SELECT MIN(t.VendorPriority) AS priority, t.SKU FROM tblVendorItems AS t WHERE t.CanShipSameDay=True AND t.VendorPriority>0 GROUP BY t.SKU) AS t2
- WHERE (((t1.VendorPriority)=[t2].[priority]) AND ((t1.SKU)=[t2].[SKU]));
Then when I try to convert it to a table I made a new query called "CreateTable" which creates a table called "VendorOrder"
The SQL for this query is:
Expand|Select|Wrap|Line Numbers
- SELECT Vendor, SKU, Date
- INTO VendorOrder
- FROM VendorOrd
The Vendor field works fine, but the SKU and Date fields are blank.
Any idea on how to fix this?