dpatfield66
Well-known member
- Joined
- Apr 6, 2006
- Messages
- 136
- Programming Experience
- 5-10
In Access (and SQL), I was able to create a UNION Query from two similar tables (one involving Triage Admissions and another involving Admit Admissions)
Basically, I'd create the first query (the UNION) and get a total count of Encounters from both tables.
But some of the encounters were identical and only one was needed.
ex: An Admit record was created from a Triage record. I only needed the Admit, not the triage in the count.
Now, in Access or SQL, I could simply save the first UNION query and then create another query that looked for these Triage duplicates and excluded them from the final count (using a basic NOT IN statement for criteria)
-------------------------------------------------------------------
The PROBLEM is...I'm in .NET using these pesky DataSets, and I'm not sure how they work.
I don't want to save a query in SQL and use it. Not as a view, not as a stored procedure, nothing. I have to work in .NET and only .NET.
So, my first union query is easy. It creates an obixAdmit.cAdmitTable (data table in .NET), and that's great.
So how do I create my second query (eliminating the Triage dupes) using the obixAdmit.cAdmitTable as my reference?
Basically, I'd create the first query (the UNION) and get a total count of Encounters from both tables.
But some of the encounters were identical and only one was needed.
ex: An Admit record was created from a Triage record. I only needed the Admit, not the triage in the count.
Now, in Access or SQL, I could simply save the first UNION query and then create another query that looked for these Triage duplicates and excluded them from the final count (using a basic NOT IN statement for criteria)
-------------------------------------------------------------------
The PROBLEM is...I'm in .NET using these pesky DataSets, and I'm not sure how they work.
I don't want to save a query in SQL and use it. Not as a view, not as a stored procedure, nothing. I have to work in .NET and only .NET.
So, my first union query is easy. It creates an obixAdmit.cAdmitTable (data table in .NET), and that's great.
So how do I create my second query (eliminating the Triage dupes) using the obixAdmit.cAdmitTable as my reference?