Walk the string

0

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga

Q&A for anime and manga fans

declare @S varchar(200),
@t varchar(100),
@f varchar(100)
set @S = 'tblfcdata.FCAttorneyFirm,tblPurchaseRev.SellerLoanID'

while len(@S) > 0
begin
  set @t = left(@S, charindex(',', @S+',')-1)

  print 'table: ' + left(@t, charindex('.', @t+'.')-1) + '   field: ' + right(@t, charindex('.', @t+'.')-1) 
  set @S = stuff(@S, 1, charindex(',', @S+','), '')
end

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results