Returning all rows while matching single row

  • Hi Experts ,

    I have a fact table which contains a  single row for each question which could have number of answers with start employment status and end employment status keys.
    Fact Table
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYgAAAAmCAYAAADeIgwMAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAxaSURBVHhe7Z1/bBPnGce/6dSV0tEi9Y9RqbQ0jvnhmEqTOuQm0tYyEhJT1hAQlSaxaeVHKhItbgs0k6b9MXVaFEKUlFRasjQTmlS1NNDgCpswfmx/EFntpEpgOwjbaqe2E/9UglJaICTZ+969d747353PzoU4yfOBx7573vd97rnnnvP7vnd2rmyKAQ03btzAkiVLxBqhhWJDzDaUg4Tb2OXUfeKdIAiCIHTkdBCGCQWhgWJDzDaUg4Tb2OUUzSAIgiAIUwrrIKJNKCsrE1KNnrTQlxLpHlRX90ByjS+r/srSFJVquY9hW8p2ok367auidUSKqyGeJr5zKciuETubSpmufRo91Uw33Xi6HBv7dlE0lTWxVy0GnYU/lvD6SgwkNHExiYlsk2/TxLa0P0b/XMDSD6XMJL9cPq66tkqZzhDlkwSvX+r5JHB+iYk7EgQirJzXmZr6A5JeFzsJbdByAjgNqrqRUn1OwfemwyQ0wXoqxg6e9yi2p8R2Ut2IB+WDVt+nbDuCPeyfGr++erkpIzrcjz17/Dh60rDHOt+ZcLtvynFxYtcUo00mapOqKlTFr2Tjnj6Jo6NiWUHbXuOPNe7Hpuh9l7D2xynRJi9C/gimLrSigitMY1qPvhzbbNvBOLpTfXDiqRnctiV2xxajCP3G5ljp2hZwnlA+zel84nD7VjjsIFgP96bREeZwxI/QwUJC4ZCKVlxQguUqFWg94iQJzbEMZPoK4lXbsUlxmPs/5fSgpXElvgcNfQ3wHz1p71fFSvhHk0iJVffZju3+o1DPnVQS7GxClVjNwYk/9yo2TpmWP6x5TzWCcXYCO/nwYLaPdMcRlD5p+SgxiHj3EbROI7HtTmZb2IdOtz8EZ6fr9M6T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/191pc1hBXMhpQdf0dS3nsISfR/7P9uTlq5Lw4+iUvnqyZXd7iBQJwMiIHaCsSBt7FyfW5JOFDBus5lYa3206Jb1zNujrNM8SfPxZ6czT+olNmg2S/7Ml/HpLtOOrx0s6Hom+RkVVBADEJfaD11Y7T2vypgDFnsThWpMX81u0tVk3ab3VomrONv7swa/TZtA6ji3hF1Sv6ZHoy+WhwwrAiIgnGnKkIK5fVvqR76DxmmiytHiqQnVp5RmW4tM/L1u0KNdx+jFsPQDAMMTz5KWk22mlAtSlzfXWgJqdYKoQ812pb1CTJfVsr56R6+kR5PiC6pnk/6xNAEBMYq7Jl4iF/MtyzTZH1UKDILiTZFjCj4208Oq35MSrZRdeZ1+lUqj8HxNQj/Nd8n/8rAcAMAog/5dSEKAMgHQA+T8AAEgwMPIAAJBgIP+XUrBcA0A6gPxfSoGRByAdQP4PAAASDOT/Uoo1t1fUOwBAUokfTx4AAMDEAiMPAAAJBkYeAAASzBiMfJMWosQxAZNN9wzNZI7vxXtnOG/mjFJ7el/M89955lnLc5XVCMoHAIyFERr5Lq1IYYgy1VUOmHZ+QdUTMMgATDMjNPIcfIr/UrZBkHxICMUfUq3wIyc6JABg+ogl/weSz+zSD6m9DG8egGkFsWtAONln6RS8eQCmlljLNc0FFRccmn+JprT6z0Tw5gGYSmJ58qVVVRZKIQnnUVqa/086cVoXcf0m5Yu/IpfaY/fX1C7mCGp+AEwO+J08iER28QUq1P9Vk+X7Bh0p/IK2dbvf6VCr8E2CACQAkwPW5EFEhDdf+yO1bVFa/Tnll79OmYxKyznqrD6q9gpaP6KcvY/Twvvh+QCAkQP5v5SCAGUApAN48gAAkGBg5AEAIMFA/i+lYLkGgDRA9P9SZCIbWtE2ewAAAABJRU5ErkJggg==

    I need to create a view for each question (i.e. 1939) and return all 7 rows from dimension with one actual value for start/end status keys being one (1) if it matches and  (0) for all non matching rows.

    Finally output something like below
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzQAAAChCAYAAAARMfoaAA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AAAAAACOIvp/lt0loBjoIjQAAAAASUVORK5CYII=

    Hope it make sense

    Kind Regards

  • Hello!

    If I understood correctly, in the last image above (with the results), in the column [START_EMP_STATUS_KEY], the position of the 1 is wrong. It shouldn't be at "At work and coping well" (which has the [EMP_STATUS_KEY] = 1), but at the  [EMP_STATUS_KEY] = 6, which is "Retired".
    So in the first line, the column [START_EMP_STATUS_KEY] should be 0.
    And in the second to last line, the column [START_EMP_STATUS_KEY] should be 1.

    If it's like above, you could try something like this:
    1. A function that will create that ouput for one QuestionId:

    CREATE FUNCTION [dbo].[fn_getTablePerQuestion](@QuestionId int)
    RETURNS TABLE
    AS
    RETURN
    (    
        SELECT QUESTIONID, EMP_STATUS_DESC, 1 AS START_EMP_STATUS_KEY , 0 AS END_EMP_STATUS_KEY
        FROM FACT_TABLE F
        INNER JOIN DIM_TABLE D
            ON START_EMP_STATUS_KEY = EMP_STATUS_KEY
        WHERE QUESTIONID = @QUESTIONID
        UNION ALL
        SELECT QUESTIONID, EMP_STATUS_DESC,0 AS START_EMP_STATUS_KEY , 1 AS END_EMP_STATUS_KEY
        FROM FACT_TABLE F
        INNER JOIN DIM_TABLE D
            ON END_EMP_STATUS_KEY = EMP_STATUS_KEY
        WHERE QUESTIONID = @QUESTIONID
        UNION ALL
        SELECT @QUESTIONID AS QUESTIONID, EMP_STATUS_DESC,0 AS START_EMP_STATUS_KEY , 0 AS END_EMP_STATUS_KEY
        FROM FACT_TABLE F
        FULL OUTER JOIN DIM_TABLE D
            ON (END_EMP_STATUS_KEY = EMP_STATUS_KEY OR START_EMP_STATUS_KEY = EMP_STATUS_KEY)
        WHERE ISNULL(QUESTIONID,0) = 0
    )

    2. A view that will apply that function to your entire table:

    CREATE VIEW questions_view
    AS 
    SELECT T1.*
    FROM FACT_TABLE F
    CROSS APPLY [FN_GETTABLEPERQUESTION] (F.QUESTIONID) AS T1;
    GO

    Let me know if it's what you are looking for!

  • Hi ,

    first off all thanks for taking time to look into it and respond  and you are quite right in the output bit sorry that's oversight from my end.

    Two issues I have

    1. It takes forever to workout with function as takes long time to populate the view; is there alternative approach to achieve it
    it gives below output with the above function/view
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgQAAAAzCAYAAADo4hCqAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAmGSURBVHhe7d1vaBvnHQfwr1bCHJs1gbxxMFvsWjKLog3GujJkxkiXuZXdDbcEFwbFLC+s0a7IdLh0YFYKHmwkDGnpYDa0XRiEzWRbCLXVGJOwFz5Gu1JoFZVJZxLIPPKmEG8YUv+Jds/pkX2SdfLpfLo7Wd8PPLHup0e2Yj+653fP80hP4NcXfld49WcvouTKX9/FD4aewvrGhoy4p/3wF3H33//B8c5OT36+Fd48xwUkvvQs3pFHO87hyv8uYkAe+Vtz/x+aoW0WefF7Zvt0Q+uce9ie3FJqU90nvqwfV00InhkawPq6BwlBexvu3l3B8eNag/fg51vRDM+RnMe/O3mNbZCcVmpTPd1f0Y+rJgThrz4mj4iIiOggC4fD+teqCcHwD5+WR+4rFAoIBALyyJ+a4TmS8/h3J6+xDZLTRJs6dOiQfrtqQvD9731HHnnj6NGjuH//vu+/EhERNbMjR47IWzUSAmMlN62uruLB1hfkkT+1PfLQs98PeUe0Tf7dyUtsg+Skyvbky56389ij8pY/iRECIiKig8SXCcG9z/4rb/kTpwuIiOig4QiBDRwhICKig8ZmQpBGPBDX/m0MayMEC5g4lsANeSTceOVRPZkQZWJRBjX1xvey5wiBmkJ/IKCvBjaWeKN+YUbiZ/enoMpD8kJjXx9EtaTjhvOOKycdOijqTAhUpPpFQxvEjIw0guigzS1j5mnRiZ/FH2VEt5jAj7K/wj+0ZOLeZ1eA52WyUG/cAksjBNEk8oWC/pYOveSTyEzV6KiNHTk79SblzuuDyJR27pjKlM49eSQzU0jxREIW1ZkQBJFYEg1tHmMy0gi1Rwh6MfZesRN/QUaEO+otPD78FLr1owG89MtbSIur/jMp3HvvRR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vbqRdrFe7gm90ISIiIvfVmDLY3Vm7UYiIiMh9plMGKysrMuKurq4uThmQL3HKgLzGKQNyUmV7Mk0IOjo6ZMRda2trTAjIl5gQkNeYEJCTLCcEREREdHBVJpdVE4Kzzz0jj4iIiKgV1PfBRERERHQgMSEgIiIiJgRERETEhICIiIg0TAiIiIiICQERERExISAiIiIA/we30/1laPnQQgAAAABJRU5ErkJggg==

    While output I need looking to return all rows similar to below
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA78AAACoCAYAAAAo21kkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAC+pSURBVHhe7d3Pa+tKm+DxJ7Ptf2GGhntsggf8rttmFtOL+4JNuGQzphdNljZMb2zoA+8mq8DQkAF7Mw3R8jCrzCYXcm24m55V3OvX0CGvfe9m+v/wPFUqySVZkuXYSY6V7wd0TiS59KP0w3qqSuWzn3/5df2HP/xBgPfy5z//WTjnAOA0cQ8HDsd1BHyM/+D+BwAAAACgsgh+AQAAAACVZ5s9u78BAAAAAKgkG/z+1P3RjQJvb/nb71L/8oMbAwCcEu7hwOG4joCPQbNnAAAAAEDlEfwCAAAAACqP4BcAAAAAUHkEvwAAAACAyiP4PYqZDM7O5OxsoH8BAAAA2FjJpG2eldsyWblJwAc43eB3NtALyFxEm6H9LldTdPG+ZaCbDqaj8eTwPvv71rL37Wxg9jw5z07yrSbSjucX59VW2jyJZbo8Tk1LDv5NPDo3zOCdHzvT551T6fNAZW3fTmXOn6LjoHatN309tieaGwBwBG9xX7YKvi9KLz9L0f00OY/vNZW1fTttL2c1aYfLyMjneBhM4v1J5F/0HcZ3V0pePiaP6vEVrTc5b2tTuIa4hnYxP3V0apbjlvlt4nVrvHRTNtOkP3VT3spyPW7peqS/frs1Tdd9sy/xOtx4a6xrD73f/h7fX1a/ub+M7X3biPKhtW6ZPE99JswDNy+dV/F4dLxkvTOrluN1K7EtJm3yOGedezGXvtUKP5O1vuz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ACARfC7p0FXA9yxrfC1bXPbXgdNK43WTOXuedTJlSeRDsU0k0wnHSMNgH0XvTAojmrWDfOedf86fM8aAIBPS787TceaD9GXpP4/0ocSCt0BYIPg1zFdl5smy+aLwgRY5m/7+10mwHXz7Hu7GsDG7/VqxNVbbObVNZ35aaM4MM5Lh51s51fu70hN82+p+Zh4j1rH71Jf7OanHaL5Zog60MqbDgBAFdzpM8gi+q7T/+NnEgBHkRsv4GSc/fzLr+ufun90owAAAAAAVA81vwAAAACAyiP4BQAAAABUHsEvAAAAAKDyCH4BAAAAAJXnOrz60Y0Cb2/52+9S//KDGwMAnBLu4cDhuI6Aj0HNLwAAAACg8gh+AQAAAACVR/ALAAAAAKg4kf8PcEk9cOpoSwcAAAAASUVORK5CYII=

    Hope it make sense and you would be able to help
    Kind Regards

  • nadeem161 - Wednesday, June 20, 2018 8:50 AM

    Hi ,

    first off all thanks for taking time to look into it and respond  and you are quite right in the output bit sorry that's oversight from my end.

    Two issues I have

    1. It takes forever to workout with function as takes long time to populate the view; is there alternative approach to achieve it
    it gives below output with the above function/view
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgQAAAAzCAYAAADo4hCqAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAmGSURBVHhe7d1vaBvnHQfwr1bCHJs1gbxxMFvsWjKLog3GujJkxkiXuZXdDbcEFwbFLC+s0a7IdLh0YFYKHmwkDGnpYDa0XRiEzWRbCLXVGJOwFz5Gu1JoFZVJZxLIPPKmEG8YUv+Jds/pkX2SdfLpfLo7Wd8PPLHup0e2Yj+653fP80hP4NcXfld49WcvouTKX9/FD4aewvrGhoy4p/3wF3H33//B8c5OT36+Fd48xwUkvvQs3pFHO87hyv8uYkAe+Vtz/x+aoW0WefF7Zvt0Q+uce9ie3FJqU90nvqwfV00InhkawPq6BwlBexvu3l3B8eNag/fg51vRDM+RnMe/O3mNbZCcVmpTPd1f0Y+rJgThrz4m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82DJYs0d9RwTPYZKjBERE1ATqXlQoLL/5XXztL2fxyc2X0StjfhCbLiUWSxiGIqNF+nRHIY/w1M4Cwlr1nRKb/gPAUQIiIvI584TAcNVuLOrFYjLw8Y2f4rEq9++3OENFLgNExNxAGbN1D2b1nXAaEyPvYvS8cTK5B+Hov/S1DNvU28hEQ9gZcKZmo09DGRYN5LNKg9oUEZHz6hshWHgJX3/1FP6mJQN+GhkQ9CmB0qV/+jzGlTEMxyricq2AOEmb1W+EYOJlRGYuG8YgutEX+bB8wVk+DyXSIxekUVMKhRHN5ORokEgyozAsKSAi8rW61hBcv/aWFn0Lz7a3oUOW02+qu+rtp9glpgTmMVh8//fgDMbkWoGyeCCE2ZE8xBslzOo3xmlMJL8pbxfFpv+O8NQJ7efLMhVCfvq0vFejvIFQ6T5R4jdrx8l7wQQmt9elhDAemUSCGR4RNQnTzY3aDrdjY2NTRt2ztbnOzY3Il7i5EXmNmxuRk6xvbqRdrFe7gm90ISIiIvfVmDLY3Vm7UYiIiMh9plMGKysrMuKurq4uThmQL3HKgLzGKQNyUmV7Mk0IOjo6ZMRda2trTAjIl5gQkNeYEJCTLCcEREREdHBVJpdVE4Kzzz0jj4iIiKgV1PfBRERERHQgMSEgIiIiJgRERETEhICIiIg0TAiIiIiICQERERExISAiIiIA/we30/1laPnQQgAAAABJRU5ErkJggg==

    While output I need looking to return all rows similar to below
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA78AAACoCAYAAAAo21kkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAC+pSURBVHhe7d3Pa+tKm+DxJ7Ptf2GGhntsggf8rttmFtOL+4JNuGQzphdNljZMb2zoA+8mq8DQkAF7Mw3R8jCrzCYXcm24m55V3OvX0CGvfe9m+v/wPFUqySVZkuXYSY6V7wd0TiS59KP0w3qqSuWzn3/5df2HP/xBgPfy5z//WTjnAOA0cQ8HDsd1BHyM/+D+BwAAAACgsgh+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W7zVudFJm2RQSKDlcljnR5lbeZnVN50AAAqQ78M295zB997wPHlxgs4CQS/zkBP4iv9f9wKx2MmuOrq9KXIeq3DVGRU3wS5t/ciSzNdh2lfpBsFazvSIaml+T4fkT8AALzWQJ8zZLx57gj0OYSCd+B4cuMFnAyCX+dOvyiehm7Es3rRf/QEv6iF49IR0RhXXtyXyd2TSDSr3tB/FmEt5K50SOmFN5K48AAAAJQ302BX/7uOnmX0ucN8rz4v3TiAg+XFCzgdBL871M71n7lI+rsj68vkdqTxrgZxJt7dJx1Cw2+af/rNTSk1AAD7iQrdTeWvb2GmAwAsgt9dOq45s3t/xgwL/XKJmebNbnqgn4tLg3alw7aayLXm2egqrD0HAACvd950fwAALILfEjp37v0ZNzTnboahQW40fdkIg9zovdXCdMhk8qyv+XRFJwIAABzkZeH+AABYBL/7cu/UXGrQm1a7sC2Ost/rLUiHpLtp2PnVoxv3pZtv2WZeAAB8cnmvWzXNdACARfC7p0FXA9yxrfC1bXPbXgdNK43WTOXuedTJlSeRDsU0k0wnHSMNgH0XvTAojmrWDfOedf86fM8aAIBPS787TceaD9GXpP4/0ocSCt0BYIPg1zFdl5smy+aLwgRY5m/7+10mwHXz7Hu7GsDG7/VqxNVbbObVNZ35aaM4MM5Lh51s51fu70hN82+p+Zh4j1rH71Jf7OanHaL5Zog60MqbDgBAFdzpM8gi+q7T/+NnEgBHkRsv4GSc/fzLr+ufun90owAAAAAAVA81vwAAAACAyiP4BQAAAABUHsEvAAAAAKDyCH4BAAAAAJXnOrz60Y0Cb2/52+9S//KDGwMAnBLu4cDhuI6Aj0HNLwAAAACg8gh+AQAAAACVR/ALAAAAAKg4kf8PcEk9cOpoSwcAAAAASUVORK5CYII=

    Hope it make sense and you would be able to help
    Kind Regards

    Try this on for size:
    DECLARE @QID AS int = 1939;

    WITH DIMENSION_TABLE AS (

        SELECT 1 AS EMP_STATUS_KEY, 'At work and coping well' AS EMP_STATUS_DESC
        UNION ALL
        SELECT 2, 'At work and struggling or reduced duties due to ...'
        UNION ALL
        SELECT 3, 'Off work due to complaint'
        UNION ALL
        SELECT 4, 'Off work for other reason'
        UNION ALL
        SELECT 5, 'Not working'
        UNION ALL
        SELECT 6, 'Retired'
        UNION ALL
        SELECT -1, NULL
    ),
        FACT_QUESTIONS AS (

            SELECT
                1939    AS QuestionID,
                6        AS START_EMP_STATUS_KEY,
                -1        AS END_EMP_STATUS_KEY
    )
    SELECT
        @QID                                                    AS QuestionID,
        DT.EMP_STATUS_DESC,
        CASE
            WHEN FQ1.START_EMP_STATUS_KEY IS NOT NULL THEN 1
            ELSE 0
        END                                                        AS START_EMP_STATUS_KEY,
        CASE
            WHEN FQ2.END_EMP_STATUS_KEY IS NOT NULL THEN 1
            ELSE 0
        END                                                        AS END_EMP_STATUS_KEY
    FROM DIMENSION_TABLE AS DT
        LEFT OUTER JOIN FACT_QUESTIONS AS FQ1
            ON DT.EMP_STATUS_KEY = FQ1.START_EMP_STATUS_KEY
            AND FQ1.QuestionID = @QID
        LEFT OUTER JOIN FACT_QUESTIONS AS FQ2
            ON DT.EMP_STATUS_KEY = FQ2.END_EMP_STATUS_KEY
            AND FQ2.QuestionID = @QID
    ORDER BY 3 DESC, 4 ASC, DT.EMP_STATUS_KEY;

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 4 posts - 1 through 3 (of 3 total)

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