G
Guest
This is a union query from an Access Database
But I will also be using SQL server
For the meantime in Access,
I want parameters MRN, [GROUP] and SGR
For the following UNION query - (how should I go about this using ADO.NET?)
SELECT 'Inpatient' AS Type, [IN-BNFT] AS Benefit, [IN-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Outpatient' AS Type, [OUT-BNFT] AS Benefit, [OUT-BFCH] AS
Charge, MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Ancillary' AS Type, [ANC-BNFT] AS Benefit, [ANC-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Emergency' AS Type, [EMR-BNFT] AS Benefit, [EMR-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Drug' AS Type, [DRG-BNFT] AS Benefit, [DRG-BFCH] AS Charge, MRN,
[GROUP], SGR
FROM Membership
UNION
SELECT 'Optical' AS Type, [OPT-BNFT] AS Benefit, [OPT-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Psych' AS Type, [PSY-BNFT] AS Benefit, [PSY-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Injection' AS Type, [INJ-BNFT] AS Benefit, [INJ-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'AIDSApp' AS Type, [CAA-BNFT] AS Benefit, [CAA-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Ext Care' AS Type, [ECF-BNFT] AS Benefit, [ECF-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Claims ER' AS Type, [ERC-BNFT] AS Benefit, [ERC-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
But I will also be using SQL server
For the meantime in Access,
I want parameters MRN, [GROUP] and SGR
For the following UNION query - (how should I go about this using ADO.NET?)
SELECT 'Inpatient' AS Type, [IN-BNFT] AS Benefit, [IN-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Outpatient' AS Type, [OUT-BNFT] AS Benefit, [OUT-BFCH] AS
Charge, MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Ancillary' AS Type, [ANC-BNFT] AS Benefit, [ANC-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Emergency' AS Type, [EMR-BNFT] AS Benefit, [EMR-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Drug' AS Type, [DRG-BNFT] AS Benefit, [DRG-BFCH] AS Charge, MRN,
[GROUP], SGR
FROM Membership
UNION
SELECT 'Optical' AS Type, [OPT-BNFT] AS Benefit, [OPT-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Psych' AS Type, [PSY-BNFT] AS Benefit, [PSY-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Injection' AS Type, [INJ-BNFT] AS Benefit, [INJ-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'AIDSApp' AS Type, [CAA-BNFT] AS Benefit, [CAA-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Ext Care' AS Type, [ECF-BNFT] AS Benefit, [ECF-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership
UNION
SELECT 'Claims ER' AS Type, [ERC-BNFT] AS Benefit, [ERC-BFCH] AS Charge,
MRN, [GROUP], SGR
FROM Membership