CTEs and UNION SELECT in STAR Schema

  • Hi there,

    It seems I can't use old standbys like CTEs and UNION SELECT statements with STAR Schema databases? Is this true or am I missing something? Are there different ways to do this with non-RDBs? They are standard FACT and DIM tables but I need to pull data from the dimension tables to explain the fact tables and nothing seems to work. For information, I am pulling data from Teradata and not using SSMS to write the code as I am still on SQL Server 2005. Thanks!

  • Star schema's with facts and dimensions is just a modelling technique used for data warehouses.

    If your model is implemented in SQL Server, you can still use CTEs and UNION ALL queries.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks Ken. Unfortunately, I don't know of a way to connect directly to Teradata from SQL Server 2005 to write code. I think it works in SQL Server 2008 but not in 2005 unless I am mixed up about that which is entirely possible. I know that I can link from Visual Studio but not from Management Studio.

  • I know there are specific SSIS connectors for Teradata, but not sure they are available for 2005.

    Never worked with Teradata myself.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • K,

    Thanks for help. Was trying to avoid duplicate work but not sure it's possible. Don't really see the logic of pushing the data from an ERP into a DW and then into SQL but I grew up in the world of Keep It Simple. 🙂

  • Janie.Carlisle (10/30/2013)


    K,

    Thanks for help. Was trying to avoid duplicate work but not sure it's possible. Don't really see the logic of pushing the data from an ERP into a DW and then into SQL but I grew up in the world of Keep It Simple. 🙂

    A datawarehouse is still the same as a regular SQL Server database. It's just more denormalized,, which is a modelling technique.

    If you can get it into the DW, you can get it into SQL.

    Unless you mean Teradata with DW, that's something else 🙂

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply