How can I get values from one table to another via similar values?

Posted by Andrija on Stack Overflow See other posts from Stack Overflow or by Andrija
Published on 2010-06-15T12:30:25Z Indexed on 2010/06/15 12:32 UTC
Read the original article Hit count: 152

Filed under:

I have a table called excel that has 3 columns, name, id, and full_name. The name part is the only one I have and I need to fill id and full_name. The other table that contains the data is called tim_pismena and has 2 columns that I need, id and pismeno_name (the actual names are not important, but i'm writing them just for clarity). In pseudooracle code :) the select that gets me the values from the second table would be done something like this:

SELECT tp.id, tp.pismeno_name
FROM tim_pismena tp
WHERE  upper(tp.naziv_pismena) LIKE IN upper('%(SELECT ime as FROM excel)%')

and when used with an insert, the end result should be something like

name id full_name Happy Joe 55 Very fun place Happy Joe, isn't it?

© Stack Overflow or respective owner

Related posts about Oracle