详细介绍看这里,我就不复制了,来一段代码实例。
SELECT * FROM OPENQUERY([LNDB],'Select A.T$orno,Abs(A.T$oamt),A.T$ofbp,E.T$nama,A.T$cofc,A.T$cwar,C.T$uusr,A.T$odat,A.T$txta,A.T$txtb
From Baan.Ttdsls400301 A,Baan.Ttdsls401301 B,Baan.Tttaad200000 C,Baan.Ttccom100301 E
Where A.T$ofbp = E.T$bpid
And B.T$pmsk = C.T$user(+)
And B.T$pono = 1
And A.T$orno = B.T$orno
And A.T$odat >=to_date(''2011-08-01 00:00:00'',''yyyy-mm-dd hh24:mi:ss'')
And (A.T$sotp = ''RMA'' or A.T$orno like ''RO%'')')