Update TabA with value fromTabB

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jen (anonymous_at_discussions.microsoft.com)
Date: 04/02/04


Date: Fri, 2 Apr 2004 02:01:26 -0800

I need help on this..

update TabA set Col A = (Select Col B from TabB where
ColC=ColC)

TabA is a Detail Table, Col A belong to TabA
TabB is a Header Table , Col B belong to TabB
ColC is the DocumentNo of both Tables (share same name
and is the link in my query)..

But I got error when I run which I don't understand
since Header to Detail is one to many
relationships...there's aren't duplicate documnets in
Header

Subquery returned more than 1 value. This is not
permitted when the subquery follows =, !=, <, <= , >, >=
or when the subquery is used as an expression.
The statement has been terminated.



Relevant Pages

  • Re: Query Join no unique link
    ... NrSeq seems to be different but if you do not care about that then one ... Or you can just disregard the TabB. ... (yes the join fields are the same, but I don't have a unique link between ...
    (microsoft.public.sqlserver.programming)
  • Variables Update einer Tabelle
    ... ich habe schwierigkeiten eine Update-Klausel zu formulieren. ... Tabellen (TabA, TabB). ... Ich formuliers mal in Worten: ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: Joins... Urgent
    ... >FROM TabA left join TabB on TabA.FldA = TabB.FldA ... If there is no record in TabB that matches any record in TabA, ... Come for live chats every Tuesday and Thursday ...
    (microsoft.public.access.queries)
  • Re: SQL: getting data for a null value column ??
    ... Thanks hrishy san ... so i have to take name from tabB only. ... PS: about union ... FROM taba a,tabb b where b.bbankcode=a.bankcode ...
    (comp.databases.oracle.server)
  • Re: SQL: getting data for a null value column ??
    ... > so i have to take name from tabB only. ... > o/p what i want is (without using union) ... > FROM taba a,tabb b where b.bbankcode=a.bankcode ... The UNION construct in it's basic form will select *all* ...
    (comp.databases.oracle.server)