if object_id('tempdb.dbo.#tb1') is not null drop table #tb1
go
create table #tb1([TTM] varchar(20))
insert #tb1
select 'week1'union all
select 'week2'union all
select 'week4'union all
select 'week6'union all
select 'week7'union all
select 'week8'union all
select 'week9'union all
select 'week10'union all
select 'week11'
if object_id('tempdb.dbo.#tb2') is not null drop table #tb2
go
create table #tb2([NNA] varchar(20))
insert #tb2
select 'team1'union all
select 'team2'union all
select 'team3'
--- 執行代碼想要的結果 TTM有555條記錄,要求19行 NNA按照順序的從第一個week1依次有序的組合,直到依次序組合完畢。
rid TTM NNA
__________________
1 week1 team1
2 week2 team2
3 week3 team3
4 week4 team1
5 week5 team2
6 week6 team3
7 week7 team1
8 week8 team2
9 week9 team3
10 week10 team1
11 week11 team2
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/284118.html
標籤:疑難問題
上一篇:請教一個關于多相機拼接的問題
