Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select *
- ---into xrevtemp
- FROM
- DORIG
- JOIN (SELECT
- [tipodoc]
- ,[numerodoc] as numerodocpf
- ,[datadoc] as datadocpf
- ,[codicecf]
- ,[codicearti]
- ,[u_rev]
- ,U_SQLCODE
- FROM [AMK_AGTRADING]...[docrig] DOCRIG
- JOIN Xamk_docana ON DOCRIG.TIPODOC=XAMK_DOCANA.codice where u_rev !='0' and u_rev!='' and u_rev like '%[0-999]%') S ON DORIG.Cd_AR=S.CODICEARTI AND S.NUMERODOCpf=DORIG.NumeroDoc AND S.DATADOCpf=DORIG.DataDoc and dorig.Cd_DO=s.u_sqlcode and u_rev !='' and u_rev !='0' and dorig.Cd_CF=LEFT(s.codicecf,1)+'0'+RIGHT(s.codicecf,5)
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement