哈哈.....
create tableA(ID int,MSG varchar(100))
insert tableA values(1,'ABCDEFG')
insert tableA values(2,'ghijklm')
declare @b table (N int)
declare @i int
set @i=1
while @i<=100
begin
insert @b values (@i)
set @i=@i+2
endselect id,N/2+1 as seq,substring(msg,N,2) from tableA a,@b b where len(substring(msg,N,8000-N))>0  order by  id,seq

解决方案 »

  1.   

    id          seq              
    ----------- ----------- ---- 
    1           1           AB
    1           2           CD
    1           3           EF
    1           4           G
    2           1           gh
    2           2           ij
    2           3           kl
    2           4           m
      

  2.   

    第一句:
    create table tableA (ID int,MSG varchar(100))