• ps_vbdev (6/5/2014)


    So i came across my first spanner in the works in building my product dimension

    our products can be listed on our website as Live or Draft status.

    Live product are visible to everyone and available for purchase, but a store manager whos store sells those products can bring products back to Draft which means they cannot be seen to buy the public.

    When in Draft mode there attributes can be edited color, size etc. once the manager is happy with the edit they can push them back to Live status (visible again and purchasable).

    my problem is whenever a product goes from live to draft this products IsActive flag is set 0. When the same product then goes from draft back to live a new record is inserted in the product table with an IsActive flag set to 1 indicating this is the live one, and the process can go on.

    so now i have two record for the same product with two different product ids going into my product dimension, i can track the scd2 changes on the products using the surrogate keys, and also report on them individually but how would i report on them as the one product which really they are? or do i have to accept if they go through this process they have to be treated separately?

    Given that all we know of your process is what you posted....who knows?

    Please provide us some details so we know what you are trying to do. Please take a few minutes and read the first link in my signature.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/