Here is my query. v.location is a column which contains floor and room information, i.e. FL 2 RM 204. I need to compare this against the mv_rooms table which has the room and floor split into two separate columns.
select v.location, v.customer_name, v.street_name
from voip_validate v, mv_rooms r, mv_buildings b
left outer join voip_validate
on v.location = 'FL ' || r.floor || ' RM ' || r.room
where 'FL ' || r.floor || ' RM ' || r.room is null
and b.dps_number = r.dps_number;
When I run the query, I get the error:
ORA-00904: “R”.”ROOM”: invalid identifier
00904. 00000 – “%s: invalid identifier”
*Cause:
*Action:
Error at Line: 4 Column: 47
you’re mixing oracle join syntax and ANSI.
also your where clause is totally wrong as it can never be null.
were you intending to return rows that had no matching row in “V”?