Possible Duplicate:
Select Records multiple times from table
I want to have my query return (multiple) rows for the value of TABLE_B.QTY.
TABLE A
SALESNR ITEMNR LINENR
100 B2001 1
101 B2002 2
102 A1021 3
TABLE B
LINENR COLOR QTY
1 WHITE 3
2 BLACK 1
3 BROWN 8
For instance, with the following query:
SELECT TABLE_A.SALESNR, TABLE_A.ITEMNR, TABLE_B.COLOR, TABLE_B.QTY
FROM TABLE_A INNER JOIN TABLE_B ON TABLE_B.LINENR = TABLE_A.LINENR
I get:
100 B2001 White 3
What I need is:
100 B2001 White 3
100 B2001 White 3
100 B2001 White 3
Is there a way to do this?
Can’t think of the right keywords to Google this…
Thnx,
Mike
This will work as long as QTY is less than 2047
use this if QTY exceeds 2047: