Re: Add memo data to existing table based on item #

From: Anders (anders_at_anders)
Date: 07/28/04


Date: Wed, 28 Jul 2004 10:18:10 +0200

SELECT Table1
REPLACE ALL descrpt WITH LOOKUP(Table2.memoname,Table1.Itemid,Table2.itemid)
In VFP9
UPDATE table1 SET memo=Table2.memo from table2 WHERE
Table2.itemid=Table1.itemid
or
UPDATE table1 SET memo=NVL((select Table2.memo from table2 WHERE
Table2.itemid=Table1.itemid),'')

-Anders

"shotz11111" <shotz11111@discussions.microsoft.com> wrote in
news:D06586C9-9A54-4BF0-BA8D-136A6D4FB3BB@microsoft.com...
> I have an existing table(Items) with an ItemID # and a Memo field for a
Description. This memo field is currently empty. I have the Memo info and
Item ID# in a separate table that I want to add to the Items table. Is there
a way that I can add the memo info to the Items table based on ItemID #????



Relevant Pages

  • Re: update a table from another table
    ... UPDATE table1 SET ... that is not correct syntax. ... the FROM clause, not just table2. ...
    (microsoft.public.sqlserver.programming)
  • Re: update a table from another table
    ... UPDATE table1 SET ... that is not correct syntax. ... clause, not just table2. ... of the update in the FROM clause. ...
    (microsoft.public.sqlserver.programming)
  • Re: Transaction does not work
    ... >I create a transaction as follow: ... > update table1 set ... ... > While inserting record into table2, ...
    (microsoft.public.sqlserver.programming)
  • Re: Select with aliases, please help
    ... UPDATE Table1 SET Stat='T', TransferedTo=( ... SELECT b.Store FROM Table2 b ... UPDATE Table1 SET Stat='T', TransferedTo=b.Store ... Prev by Date: ...
    (comp.databases.ms-sqlserver)