I need help in one SQL query.
I have select in select:
select column1 from table where column2 in ( --there I have select command what returns me 609 rows with duplicate values )
and I need to get in first select 609 rows with duplicates. But I only get 12 rows because the select in command ignores duplicate values in second select.
I need to get certain values (609rows) not only to find what values I get two or more times. I will join this result to another result.
My query looks like this :
This is the first select I was talking about
select serialnumber from ffPackage where ID in (
and this is the select from what I get 609 rows.
select parentID from ffPackage where SerialNumber in ( select ffPackage.SerialNumber from ffEmployee, ffHistory, ffSerialNumber, ffPackage, ffUnitDetail where ffHistory.UnitID in ( select UnitID from ffUnitDetail where OutmostPackageID in ( select ID from ffPackage where SerialNumber = 'xxxxxxxx')) and ffHistory.EmployeeID = ffEmployee.ID and ffHistory.UnitID = ffSerialNumber.UnitID and ffHistory.UnitStateID = 'xxxx' and ffUnitDetail.UnitID = ffHistory.UnitID and ffUnitDetail.InmostPackageID = ffPackage.ID ))