Hello everyone, i'm new to the forum.
My problem is. i have to update a live table, ORG, it contains information on corporate authors. i have a batch file that is being processed by perl. it had a few issues. but i have cleansed the data enough so that it looks correct.
SELECT
*
FROM
xcauthors2 x
INNER JOIN org o ON o.an = x.an and .otype = 'c' AND o.org = x.org and o.str = x.str
ORDER BY X.AN
total records retrieved = 33965
this query should return the number of records that are matched by an, org, and str, by the way there is no unique identifier, a unique entry is identified by the an, org, str, combination.
the total number of records retrieve from the batch file is 39107.
so i'm now at the point where i want to take a look at the 79 records that do not match.
SELECT *
FROM xcauthors2 x
WHERE not exists
(select * from org where org = x.org and an = x.an and str = x.str and otype='c')
total records returned = 5140
33965
+5140
---------
39105
my question is what happened to the 2 extra records. and why is the query not exact.
any comments would help.
thank you
Metzy
My problem is. i have to update a live table, ORG, it contains information on corporate authors. i have a batch file that is being processed by perl. it had a few issues. but i have cleansed the data enough so that it looks correct.
SELECT
*
FROM
xcauthors2 x
INNER JOIN org o ON o.an = x.an and .otype = 'c' AND o.org = x.org and o.str = x.str
ORDER BY X.AN
total records retrieved = 33965
this query should return the number of records that are matched by an, org, and str, by the way there is no unique identifier, a unique entry is identified by the an, org, str, combination.
the total number of records retrieve from the batch file is 39107.
so i'm now at the point where i want to take a look at the 79 records that do not match.
SELECT *
FROM xcauthors2 x
WHERE not exists
(select * from org where org = x.org and an = x.an and str = x.str and otype='c')
total records returned = 5140
33965
+5140
---------
39105
my question is what happened to the 2 extra records. and why is the query not exact.
any comments would help.
thank you
Metzy