Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT COLUMN_NAME FROM temp.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '' + @dstname + '_TMP' AND COLUMN_NAME like '%_ID'
- open @cursor2
- fetch next from @cursor2 into @col
- while @@FETCH_STATUS = 0
- begin
- set @sub = substring(@col, 1, (len(@col)-3))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement