I have 2 tables as below
Product_Asset:
PAId Tracks
1 2
2 3
Product_Asset_Resource:
Id PAId TrackNumber
1 1 1
2 1 2
3 2 1
4 2 2
5 2 3
I would like to know if I can generate the data in product_asset_resource table based on product_asset table using TSQL query (without complex cursor etc.)
For example, if the number of tracks in product_asset is 3 then I need to populate 3 rows in product_asset_resource with track numbers as 1,2,3