For the complete documentation index, see llms.txt. This page is also available as Markdown.

CONVERT CỘT ẢO SANG CỘT THẬT

Chuyển cột 'sohopdong' từ cột ảo sang cột thật 'chuongtrinh'

Update DuLieuKeToan set chuongTrinh = SoHopDong
from
(
select CASE WHEN MoreValue='' or CHARINDEX('>>>SoHopDong:',Morevalue,0)<=0 THEN N'' ELSE SUBSTRING(MoreValue+'>>>',charindex('>>>SoHopDong:',MoreValue,0)+LEN('>>>SoHopDong:'), charindex('>>>',MoreValue+'>>>',charindex('>>>SoHopDong:',MoreValue,0)+1)-charindex('>>>SoHopDong:',MoreValue,0)-LEN('>>>SoHopDong:')) END AS SoHopDong
,identityKey,ChuongTrinh
from dulieuketoan where nghiepvu in (1000003,1000004,1000005)
and MoreValue<>'' and MoreValue like '%sohopdong%'
)temp where temp.identityKey = DuLieuKeToan.identityKey

Last updated