Hi Everyone,
I am still in the process of learning SQL, and I am having trouble specifically with the the left outer join. I normally join tables using equijoin's, but I am not getting the right data set returns, and thought the using a left or right outer join would resolve the problem...
Here is my SQL that is working properly with 1 left outer join. I am building the query slowly so in the next SQL you will see where I am seeing the error. I don't expect you to understand the data and columns I am trying to join, I believe the problems I am experiencing are related to syntax, and I am hoping you can find where my syntax errors are.
select
s.name as "Screen Name",
sv.view_name as "View Name",
s_view.name
from
s_screen s,
s_screen_view sv
left outer join s_view
ON (sv.view_name = s_view.name)
where
sv.screen_id = '1-866A-1X3LU' and
s.row_id = sv.screen_id and
s.repository_id = '1-866A-1' and
s_view.repository_id = '1-866A-1';
Here is the SQL where I am experiencing the following error...
Error:
ORA-00904: "SV"."VIEW_NAME": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error at Line: 14 Column: 7
Problematic SQL:
select
s.name as "Screen Name",
sv.view_name as "View Name",
s_view.name,
s_applet.name as Applet
--a.name as "Applet Name"
from
s_screen s,
s_screen_view sv,
s_view_wtmpl_it wti
left outer join s_view
ON (sv.view_name = s_view.name)
left outer join s_applet
ON (wti.name = s_applet.name)
where
sv.screen_id = '1-866A-1X3LU' and
s.row_id = sv.screen_id and
s.repository_id = '1-866A-1' and
s_view.repository_id = '1-866A-1';
Thanks in advance for your help.
Chris