想知道這段代碼有什么問題?請指教
if exists(select 1 from sysobjects where id=object_id('V_TE1'))drop view V_TE1
GO
CREATE VIEW V_TE1 AS
select A.A005,B.B001,B.B002,B.B004,B.B017,B.B018,B.B005,B.B006,B.B012,C.C001,C.C002,C.C006,D.D004,E.E004,E.E012,
F.TENO,F.SELDATE,F.ENDDATE from MOCTC A
left join MOCTE B ON A.A001=B.B001 AND A.A002=B.B002
LEFT JOIN MOCTA C ON B.B011=C.C001 AND B.B012=C.C002
LEFT JOIN MOCTB D ON C.C001=D.D001 AND C.C002=D.D002
LEFT JOIN COPTC E ON C.C026=E.E001 AND C .C027=E.E002
LEFT JOIN T_TEDATE F ON B.B001=F.TENO and LEFT(B.B002,8)=convert(char(10),F.SELDATE,6) and left(B.B002,8)=convert(char(10),F.ENDDATE,6)
想知道這段代碼有什么問題?
請指教