Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I have below two tables which are joining based on Id and Value.I want all the choices into answerfact table.
I have a requirement to display all the choices for each Id from choice table though respective values are not available in answerfact table.I want all the records from answerfact table since it is the main fact table.
Choice:
Id value Choice
100 1 A
100 2 B
100 3 C
100 4 D
100 5 E
200 1 A
200 2 B
200 3 C
300 4 D
300 5 E
300 1 A
300 2 B
400 3 C
400 4 D
400 5 E
500 1 A
500 2 B
500 3 C
500 4 D
500 5 E
Answerfact:
Id value Cmp year answerId
100 1 aaa 2016 A01
200 2 bbb 2016 A02
300 4 aaa 2016 A03
600 6 ccc 2016 A01
700 7 ddd 2016 A02
500 1 aaa 2016 A03
500 2 bbb 2016 A01
500 3 ccc 2016 A05
500 4 ddd 2016 A06
500 5 eee 2016 A07
Thanks in advance
Hi
so you can do
load * Answerfact;
left join (Answerfact)
load * Choice;
this will leave all records from answer fact but will only keep records from Choice where there is a corresponding
record in answer fact
or you can do
load * Answerfact;
join (Answerfact)
load * Choice
this will keep all records from both tables
Thanks for your reply.
I want to show all the text though respective Answer values are not available in first table(A)
For Example id 34955 the texts A,B,C,D should display where D,C will not be having any answer value.Instead of displaying all the texts(A,B,C,D,E,F,G,H) in bar chart i want to display only above 4 texts(A,B,C,D) since C,D texts are available from the second table.Similarly for id 34956 i want to display E,F,G ,H.I am doing outer join.
Please find the attached samples.