Forum Discussion

danielrabinovit's avatar
danielrabinovit
Cloud Apps
05-06-2025
Solved

Append Data for Dim Table

Hi Everyone,

I have a few fact tables that all share the column "registration". In my original build, I created a dim table by just saying:

Select Distinct [registration ]from Table1 etc

Now that I have other fact tables, is it possible to append all of those registration columns and then select distinct from the full list? 
Thanks

  • Hey danielrabinovit ,

    If you want to combine tables you can use union all to accomplish that. After that you can use distinct to make it unique. So for example you can do this:

    select distinct * from (
    select registration from table_a
    union all
    select registration from table_b
    unoin all
    select registration from table_X
    )

    Hamza

1 Reply

  • HamzaJ's avatar
    HamzaJ
    Data Integration

    Hey danielrabinovit ,

    If you want to combine tables you can use union all to accomplish that. After that you can use distinct to make it unique. So for example you can do this:

    select distinct * from (
    select registration from table_a
    union all
    select registration from table_b
    unoin all
    select registration from table_X
    )

    Hamza