I want to be able to extract two sets of data in one script with a total of 15 records.
In my scenario, I extract members from a certain town which for example could return 3 records, and then I want to extract the remaining 12 from that particular state.
Here is a coding sample:
SELECT MemberID, a.UserName, a.MemberDisplayName, a.NYKABizName, a.PackageType
FROM Member a
WHERE a.Claimed = 'Y'
AND a.PrCity = 'Bridgewater'
AND a.PrStateID = 36
AND a.PackageType = 'E'
ORDER BY a.MemberDisplayName
SELECT MemberID, a.UserName, a.MemberDisplayName, a.NYKABizName, a.PackageType
FROM Member a
WHERE a.Claimed = 'Y'
AND a.PrStateID = 36
AND a.PackageType = 'E'
ORDER BY a.MemberDisplayName
I dont want these two combined into one, I want a temporary virtual table where the results are stored and then the virtual table is returned once complete.
Any ideas how one can accomplish this?
Many thanks in advance,
neojakey
Your virtual table would look like this