This is a simple union query I'm using:
this is what the result look like :
I need the query show the result of tblUsedPaterials first, and then the result from tblUsedMaterials_Shared.
The result should be :
47906 ---> from tblUsedMaterials
47918 ---> from tblUsedMaterials_shared (first record)
18870 ---> from tblUsedMaterials_shared (Second record)
It seems the query is sorting by UsedProductFK even if no ORDER BY is added to the sql.
Thank you.
SQL:
SELECT UsedProductFK
FROM tblUsedMaterials
WHERE UsedProductFK=47906
UNION
SELECT SharedProductFK
FROM tblUsedMaterials_Shared ;
this is what the result look like :
I need the query show the result of tblUsedPaterials first, and then the result from tblUsedMaterials_Shared.
The result should be :
47906 ---> from tblUsedMaterials
47918 ---> from tblUsedMaterials_shared (first record)
18870 ---> from tblUsedMaterials_shared (Second record)
It seems the query is sorting by UsedProductFK even if no ORDER BY is added to the sql.
Thank you.
Last edited: