Registriert seit: 29. Okt 2002
55 Beiträge
|
Re: In View Tabellen unterscheiden
12. Dez 2003, 11:25
Hallo Funky-Sepp
Habe jetzt den View zusammen und es ´funktioniert alles wunderbar. 8)
Hier mal die kleine SQL dazu
SQL-Code:
Select A.PK_Log_Faults as PK ,A.SBatchNo,A.DTTimeStamp,A.SProductName,'F+' as Tabelle,
B.SDescription1,E.SUser_Name1,E.SUser_Name2
from Log_Faults A
Join Faults B on A.IFK_Faults = B.PK_Faults AND A.Bogekommen = 'T'
Join Log_Faults_ACK E on A.PK_LOG_Faults = E.IFK_LOG_Faults AND E.bosuccess = 'T'
Union all
Select A.PK_Log_Faults as PK,A.SBatchNo,A.DTTimeStamp,A.SProductName,'F-' as Tabelle,
B.SDescription1,E.SUser_Name1,E.SUser_Name2 from Log_Faults A
Join Faults B on A.IFK_Faults = B.PK_Faults AND A.Bogekommen = 'F'
Join Log_Faults_ACK E on A.PK_LOG_Faults = E.IFK_LOG_Faults AND E.bosuccess = 'T'
union all
Select C.PK_Log_GxP_Actions as PK,C.SBatchNo,C.DTTimestamp,C.SProductName,' A' as Tabelle,
D.SDescription1,C.SUser_Name1, C.SUser_Name2 from Log_GxP_Actions C
Join GXP_Actions D on C.IFK_GXP_Actions = D.PK_GxP_Actions
MFG
Cobra
|
|
Zitat
|