Please help me with the following query:

--------------------------------------------------------------------------------------
update    t_TNC t
set       (Ref_CT) =

          (
            select    count (r.Cited_Patent_NR) as Ref_CT

            from    t_Citation r

            where      r.Patent_ID = t.Patent_ID
            group by  r.Patent_ID
          )
----------------------------------------------------------------------------------------

I'm accustomed to MS Sql_Server, and the update query is very
different.  I had expected this query to update only those records in
T_TNC which had patent_IDs in T_CITATION, but instead it looks like
all records are updated, and sometimes I get null.  Is that correct?
Is there a better design for the query?  One in which only selected
records get updated?

Dom

-- 
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