Constructing a Union query for a DataGrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How would I do the following for a datagrid?

I want a Union Query to be my DataSet for a datagrid:

1) The Union Query
qBenefitsUnion
============
SELECT *
FROM qIN

UNION SELECT *
FROM qOUT

2) The Pieces that make up the Union
qIN
===
SELECT "Inpatient" AS Type, qMembershipSelect.[IN-BNFT] AS Benefit,
qMembershipSelect.[IN-BFCH] AS Charge, qMembershipSelect.MRN,
qMembershipSelect.GROUP, qMembershipSelect.SGR
FROM qMembershipSelect;

qOut
===
SELECT "Outpatient" AS Type, qMembershipSelect.[OUT-BNFT] AS Benefit,
qMembershipSelect.[OUT-BFCH] AS Charge, qMembershipSelect.MRN,
qMembershipSelect.GROUP, qMembershipSelect.SGR
FROM qMembershipSelect;


This would help me tremendously...Thanks.
 
Hi,
How would I do the following for a datagrid?
I want a Union Query to be my DataSet for a datagrid:

I don't understand what your question here is. You pseudo-query is almost
a valid UNION SELECT and it sounds like that is exactly what you want to
do. There's absolutely nothing that would prevent you from displaying the
results of that in any DataGrid -- so, what do you need help with?
 
I am primarilly an Access Developer.. and a very novice ASP.NET developer.
my Union Query is built from many sub Queries...

how would I build sub queries that I can refer to as tables in one Union
Query?
 
Back
Top