michellepace
Technical User
Hello,
I am following the Left Outer Join example as demonstrated by Table_32 on page 154 of the pervasive v13 manual. Namely, the expression they give is:
To avoid confusion, I have named my tables in the same manner. And this is the expression I wrote:
The error I am getting back is: "Unknown error: -19"
I rewrote the expression as the below, I got the same error again.
[link SQL]
Could anyone please tell me how I go about joining my Dept. table to my Emp table? (keeping all Emp records)
Emp
CSCode PPeriod Ref amt rows
====== ======= ========================= ======================== ========================
MP30 1 IN105604 11500.0 1.0
MP30 1 IN105605 11500.0 1.0
MP30 1 IN105606 11500.0 1.0
MP30 1 IN105607 5753.4 2.0
MP30 1 IN105608 2300.0 1.0
MP30 1 NEDBANK 111.0 1.0
MP30 2 NEDBANK 3900.99 5.0
MP30 3 IN105609 22999.99 2.0
Dept
CSCode PPeriod MatchRef amt
====== ======= ========================= ========================
MP30 2 IN105604 -11500.0
MP30 2 IN105605 -11500.0
MP30 2 IN105606 -11500.0
MP30 2 IN105607 -1400.0
MP30 2 IN105608 -100.0
MP30 2 NEDBANK -1000.0
Thanks very much in advance,
Michelle
I am following the Left Outer Join example as demonstrated by Table_32 on page 154 of the pervasive v13 manual. Namely, the expression they give is:
SQL:
SELECT * FROM Emp LEFT OUTER JOIN Dept ON Emp.DeptID = Dept.DeptID
To avoid confusion, I have named my tables in the same manner. And this is the expression I wrote:
SQL:
SELECT Emp.Ref, Emp.amt, Dept.amt FROM Emp LEFT OUTER JOIN Dept ON Emp.Ref = Dept.MatchRef
The error I am getting back is: "Unknown error: -19"
I rewrote the expression as the below, I got the same error again.
[link SQL]
SELECT e.Ref, e.amt, d.amt
FROM Emp e
LEFT OUTER JOIN
(
SELECT * FROM Dept
) d
ON e.Ref = d.MatchRef
[/url]FROM Emp e
LEFT OUTER JOIN
(
SELECT * FROM Dept
) d
ON e.Ref = d.MatchRef
Could anyone please tell me how I go about joining my Dept. table to my Emp table? (keeping all Emp records)
Emp
CSCode PPeriod Ref amt rows
====== ======= ========================= ======================== ========================
MP30 1 IN105604 11500.0 1.0
MP30 1 IN105605 11500.0 1.0
MP30 1 IN105606 11500.0 1.0
MP30 1 IN105607 5753.4 2.0
MP30 1 IN105608 2300.0 1.0
MP30 1 NEDBANK 111.0 1.0
MP30 2 NEDBANK 3900.99 5.0
MP30 3 IN105609 22999.99 2.0
Dept
CSCode PPeriod MatchRef amt
====== ======= ========================= ========================
MP30 2 IN105604 -11500.0
MP30 2 IN105605 -11500.0
MP30 2 IN105606 -11500.0
MP30 2 IN105607 -1400.0
MP30 2 IN105608 -100.0
MP30 2 NEDBANK -1000.0
Thanks very much in advance,
Michelle