sql - Oracle: What's the problem with this join? -


i can't join work in oracle. can't figure out, why it?

select e."ci", e."nombre" empleado e e."ci" in (select e."cisupervisor" empleado e);   inner join empleado on "ci"= t."ciempleado"  select e."nombre",e."apellido",p."nombreproy" empleado e, proyecto p e."cisupervisor" in (select e."ci" empleado e, proyecto p, trabajaen t e."sexo"='f' , e."ci"=t."ciempleado" , t."horas">60 , t."codproy"=p."codproy" , p."fechaini"=2010 ); 

as @cyberwiki correctly noted, trying join 2 individual queries.

the first 1 ends @ line 3 because it's terminated semicolon.

this part:

inner join empleado on "ci"= t."ciempleado" 

doesn't work on it's own since need where clause after join if want more conditions.

everything after part query executes on own.

you can try this online validator , you'll see lines 1-3 , after inner join valid sql 2003 statements, although entire query isn't.

it seems me need work bit more on understanding how joins work. can't join 2 individual queries.

i've done bit of reorganizing query , version pass, although might not you're looking for:

select e."ci", e."nombre" empleado e  inner join empleado on "ci"= t."ciempleado"  e."ci" in (select e."cisupervisor" empleado e) ,   (select e."nombre",e."apellido",p."nombreproy" empleado e, proyecto p e."cisupervisor" in (select e."ci" empleado e, proyecto p, trabajaen t e."sexo"='f' , e."ci"=t."ciempleado" , t."horas">60 , t."codproy"=p."codproy" , p."fechaini"=2010 )); 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -