Thanks to both for the quick response,  I have to say, Oracle's update
query (is that the standard SQL Update Query?) is the one that I have
difficulty understanding.  The MS version is very nice and straight-
forward.  It's that "where r.patent_id = t.patent_id" that gets me.
"T" is outside the subquery, and the subquery (it seems to me)
shouldn't even know about it.


On Jan 10, 6:28 pm, Michael Moore <michaeljmo...@gmail.com> wrote:
> MERGE INTO t_tnc t USING (
> SELECT r.patent_id, COUNT (*) ref_ct
>   FROM t_citation r GROUP BY r.patent_id) qq
> ON (t.patent_id = qq.parent_id)
> WHEN MATCHED THEN   UPDATE SET t.ref_cnt = qq.ref_cnt;

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to