January 12, 2006 at 4:26 pm
Hi all.. I'm trying to figure out a way to show multiple lines with a qty of 1 instead of one line with qty > 1.
For example:
SELECT REPLENIS."PRODUCT", REPLENIS."BULKSLOT", REPLENIS."QTY_REQD", REPLENIS."PACKSLIP", REPLENIS."WAREHOUSE"
FROM REPLENIS
ORDER BY
REPLENIS.BulkSlot
Data: 1.00034.23, AE23B, 3, 1222, SVW
Trying to get these results:
Data: 1.00034.23, AE23B, 1, 1222, SVW
1.00034.23, AE23B, 1, 1222, SVW
1.00034.23, AE23B, 1, 1222, SVW
Any help would be appreciated. Thanks
January 12, 2006 at 5:48 pm
SELECT REPLENIS."PRODUCT", REPLENIS."BULKSLOT", 1, REPLENIS."PACKSLIP", REPLENIS."WAREHOUSE"
FROM REPLENIS
INNER JOIN dbo.Nums on REPLENIS."QTY_REQD" <= dbo.Nums.Number
ORDER BY REPLENIS.BulkSlot
dbo.Nums is a table with IDENTITY(1,1) int numbers in coumn Number.
_____________
Code for TallyGenerator
January 13, 2006 at 7:03 am
I think the '<=' should be a '>=', but Sergiy's solution is a good one.
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
February 15, 2006 at 4:46 pm
I finally got back to this report.. this will work, thanks for the help folks.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply