Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sql syntax ... join
Holger Baer <holger.baer_at_science-computing.de> wrote:
>Turkbear wrote:
>> Holger Baer <holger.baer_at_science-computing.de> wrote:
>>
>>
>>>Jon wrote:
>>>
>>>>Hi, I like to know if it is possible to make a simple join but based on an
>>>>expression like the following one
>>>>
>>>>select * from table1 a, table2 where a.trim(cod) = b.cod
>>>>
>>>>thanks
>>>>
>>>>
>>>
>>>It should work as long as you get the syntax right:
>>>
>>>select * from table1 a, table2 where trim(a.cod) = b.cod
>>>
>>>With your example, I get ora-00904 invalid column name.
>>>
>>>HTH
>>>
>>>Holger
>>
>>
>>
>> And b.cod is from where?
>>
>> Shouldn't it be:
>> select * from table1 a, table2 b where trim(a.cod) = b.cod;
>>
>>
>
>Dammit! You're of course right, that one slipped my eye.
>
>Thanks.
>
>Holger
No problem..been there, done that ( more than I want to admit). Received on Fri Jan 16 2004 - 12:23:31 CST