Getting two different fields from two different tables

I have a procedure which takes two parameters and I want to get the primary key values of those two parameters from two different tables and insert into a new table.

Tbl1 Tbl2
ID1,Name1 ID2,Name2

Now Name1 and name 2 are the parameters for the procedure and I have to get ID1 and ID2 from Tbl1 and Tbl2 and insert into a new table along with current date. There is no relation between Tbl1 and Tbl2 so that I can't go for joins.

WHERE Name1 = @parm1
WHERE Name2 = @parm2

Since there is no relation between the tables - you may find that you have the same ID values from both tables. If so - you need to add something to identify which source provided the data or change to UNION ALL which will create duplicate rows in the destination.

Actually I want to insert both ID1 and ID2 into a same row into two different columns.

But if there is no relationship between the ID's and names - how do you want them related? I am not understanding what you are trying to accomplish.

It's a bit weird, but you can do:

Select ID1,ID2
From TBL1
Cross Join TBL2
Where TBL1.ID1 = @parm1 And TBL2.ID2 = @parm2

My actual requirement is like I have a User table with UserID and UserName, Role table with RoleID and RoleName. Now I am assigning a role to the user from front end. So I will be passing UserName and Rolename from frontend. From that I have to select UserID and RoleID from the corresponding tables and store the IDs in a Mapping table.