Juraj C
Juraj C

Reputation: 97

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).

Upvotes: 1

Views: 43

Answers (2)

Mayur Patil
Mayur Patil

Reputation: 303

select Date, Month, USER_ID, ID from
t1 cross join t2

Upvotes: 0

Fahmi
Fahmi

Reputation: 37483

You need to apply cross join

select date,month,userid,userno from table1 cross join table2

Upvotes: 3

Related Questions