katrina11
Technical User
- Apr 30, 2011
- 108
Hi experts,
I have two tables which I am going union into one table:
1. Claims with acute hospitalization
2. Emergency Room claims
I can use Union to create this common table. Something like that:
However it would be just a select query while I need a table
************************
It causes two questions:
1. Actually Union clause remove duplicates ...and I wonder if it means exact dedup by all fields? I do not need duplicates of the same claim ID while membername duplicates is OK.
How do I write my code to dedup just by claimid?
2. Whenever I create a single table I use the following syntax:
What would be a similar syntax with Union clause (for creating a table on Server)?
Any help would appreciate,
Thank you,
Katrin
I have two tables which I am going union into one table:
1. Claims with acute hospitalization
2. Emergency Room claims
I can use Union to create this common table. Something like that:
select * from acute
Union
select * from ER
However it would be just a select query while I need a table
************************
It causes two questions:
1. Actually Union clause remove duplicates ...and I wonder if it means exact dedup by all fields? I do not need duplicates of the same claim ID while membername duplicates is OK.
How do I write my code to dedup just by claimid?
2. Whenever I create a single table I use the following syntax:
select * into MyTable from DWtable
What would be a similar syntax with Union clause (for creating a table on Server)?
Any help would appreciate,
Thank you,
Katrin