Cannot get data based on specific flag RRS feed

  • Question

  • From the list of tables on tk3cvbiutl102, database dbMDMStaging, we need to acquire version specific and active data. You can identify active data by status_ID. DimensionVersion,DimensionVersionFlag are the domain tables that will be useful in getting dimension and version specific information.Each dimension, will have multiple versions. Each version will have one flag associated to it. All the data in other tables, will be based on versions. We need to get data that belongs “Actual” version flag.

    here are the tables :
    select * from dbo.DimensionVersion
    ID DimensionID VersionFlag_ID Name Status_ID EDWSourceSystemID EDWMetalExecID
    1       1           NULL            FY09     2            1933                         66
    6       2             3             Version_1 1         1933                             66

    select * from dbo.
    ID Dimension_ID Name Status_ID EDWSourceSystemID EDWMetalID
    1      1           Acual       1                 1933                      66
    2 1 Planning 1 1933 66


    Tuesday, March 9, 2010 9:03 AM


  • select *
    from dbo.DimensionVersion dimver, dbo.DimVersionFlag dimverflag
    where dimver.VersionFlag_ID = dimverflag.ID

    But as I can see, there are no records that have the actual-flag linked to them. You've got links to NULL and 3. Which makes me think you have no foreign keys defined, else this wouldn't be possible.

    Dimitri C. - Please mark the replies as answers if they help! Thanks.

    • Marked as answer by vishal.... _ Tuesday, March 9, 2010 12:29 PM
    Tuesday, March 9, 2010 9:15 AM