PC Review


Reply
Thread Tools Rate Thread

Constructing a Union query for a DataGrid

 
 
=?Utf-8?B?am9uZWZlcg==?=
Guest
Posts: n/a
 
      22nd Dec 2005
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.
 
Reply With Quote
 
 
 
 
Chris Priede
Guest
Posts: n/a
 
      22nd Dec 2005
Hi,

jonefer wrote:
> 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?

--
Chris Priede


 
Reply With Quote
 
=?Utf-8?B?am9uZWZlcg==?=
Guest
Posts: n/a
 
      22nd Dec 2005
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?


"Chris Priede" wrote:

> Hi,
>
> jonefer wrote:
> > 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?
>
> --
> Chris Priede
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A better way of constructing a LINQ query Dylan Parry Microsoft C# .NET 4 9th Mar 2010 09:42 AM
Help constructing a tricky query Bill Jaeck Microsoft Access Queries 1 14th Sep 2006 09:27 PM
Help constructing a tricky query Bill Jaeck Microsoft Access Queries 1 14th Sep 2006 01:37 PM
Display Union query in a datagrid? dbuchanan Microsoft Dot NET Framework Forms 0 19th Sep 2005 05:02 PM
Display Union query in a datagrid? dbuchanan Microsoft VB .NET 0 19th Sep 2005 05:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:47 AM.