Home > Software design >  Setting set of text values for each ID
Setting set of text values for each ID

Time:07-28

I am working in SQL server and have two tables in my database, I am attaching their sample screenshots below:

Table 1:table_1

And the second table is as shown in the image below:

Table 2:table_2

I am trying to assign all the Korean language values from table_1 which are in Action_Item_in_Korean column to each value in the Asset_No column so my output should look like as shown below:

Output:Output

Each Asset_No should repeat 8 times because there are 8 values in table_1 that need to be updated. , I know that simple update query is not enough to display the output as I need, searched alot but so far unable to design a solution for this.

CodePudding user response:

You tagged "cross join" and that seems like it satisfies your goal. A simple example is:

select <columns you desire> 
from dbo.[table 1] as t1 cross join dbo.[table 2] as t2
order by ...
;
  • Related