Skip to content
Advertisement

Multiple rows in table with values from another table

I am struggling with following issue:

Table1:

enter image description here

Table2:

enter image description here

Expected result:

enter image description here

Basically I want to multiple rows in dates table with rows from User table. Is it somehow possible? (using TSQL).

Advertisement

Answer

You need to apply cross join

select date,month,userid,userno from table1 cross join table2
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement