Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> sql statment

sql statment

From: Dennis L. Baker <dbaker_at_huec.com>
Date: Wed, 18 Nov 1998 11:21:35 -0800
Message-ID: <boD42.508$kp5.350@newsfeed.slurp.net>

It has been a long time since I have used SQL... this is so basic I am embarrassed to ask.

I want to update one tables field with data from a other tables field.

both tables may have identical values in the "id" field, but will have different values
in the "type" field, I will want to use the first value of "type" from the table_two database
for (if they exist) all of the "type" fields with matching "id" fields in table_one

the id field is the field i will use to match the data

I could use the "group by id having count > 1" I think

like....

update table_one
set table_one.type = table_two.type
where table_one.id like table_two.id

I always get a "ORA-00904: invalid column name" error

please help or better yet explain "how to" as I would like to understand SQL. dlb Received on Wed Nov 18 1998 - 13:21:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US