- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
select
'select'+
' ''update BigTable'+
' set SomeFlag=''''U'''','+
'ARCHIVE_ID=''''''+OPERATIVE_ID+'''''''+
' where ID='''''+ID+''''''+
' '''+
' from AnotherTable'+
' where OPERATIVE_ID='''+ARCHIVE_ID+''''+
' and SUMMA='+convert(varchar,AMOUNT)+''+
' and FILLING='''+COMMENT+''''
from BigTable
Опубликован исходный код BigTable от Google!