Friday, April 24, 2015

Factless Fact Table

Fact table is nothing but the fact table does not contain measures or facts. These tables are called “Factless Fact tables”.

For example -  Below fact table which has only Cust_ID_Prod_ID and Cust_Add_ID key is a factless fact. There are no measures in this table. But still you can find out products sold over a period of time.


Thanks and Regards
Rp - rakeshpatil002@gmail.com

Bridge Table

If you want to connect two tables where there is no relation ship you can use a thrid bridge table for connecting them which will have common columns in both tables, this is used in BMM Layer.


Thanks and Regards
Rp - rakeshpatil002@gmail.com

Duplicate rows in a table

SELECT
  Col1, Col2, COUNT(*)
FROM Table1
 GROUP BY Col1, Col2
HAVING COUNT(*) > 1