November 19, 2015 at 1:59 am
Hello everyone.
I am in a situation where i could use some help. I am creating a view that has to left join 3-4 tabels: a little screenshot to get the idea.
Where there is checkmark are the colons i want to join. However to get to the 3 colons from DimKunder, i need to go though FactSystemServereKunder, since its the relation. I hope it makes sense?
Thanks in advanced.
Daniel
November 19, 2015 at 7:42 am
I'm sorry, I can't see the screenshot. It would be better if you post DDL for the tables instead of screenshots.
November 19, 2015 at 7:52 am
Nicegirl13 (11/19/2015)
Hello everyone.I am in a situation where i could use some help. I am creating a view that has to left join 3-4 tabels: a little screenshot to get the idea.
Where there is checkmark are the colons i want to join. However to get to the 3 colons from DimKunder, i need to go though FactSystemServereKunder, since its the relation. I hope it makes sense?
Thanks in advanced.
Daniel
You need to use a join to get those values. Most likely from DimServere.Servernavn to FactSystemServereKunder.Servernavn. Then another join to DimKunder on FactSystemServereKunder.KundeID = DimKunder.KundeID
That is mostly a guess though based on the column names. You might want to take a look at this article which does a great job explaining joins. http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/[/url]
_______________________________________________________________
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/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply