I am struggling with a sql requirement. I have a main table 1 record. Then 4 many ot many tables.
mt = main table
t1 = many to many table
t2 = many to many table
t3 = many to many table
t4 = many to many table
What i want is to get all the data from each into there columnss but now have any duplicate data from any table.
eg if t1 has 3 rows and t2 has 2 rows and t3 has 1 and t4 as 1 then when i do the select i just want the select like:
01 | S56Z | 123 | 989 | 4840713
01 | 070A | 456 | |
01 | V60A | | |
not 1 row per every posssible different possibility which is the default in sql.
Hope this makes sense to someone. I cannot think of a way to do it without using loops and table variables.