Query Help - include

2008-05-09 Thread daniel kessler
I am using Oracle and I have a table for expenditures that stores a person's ID when the expenditures is approved. The person's ID is from a People table. When I query, I want to make a new variable that references the other table to put in their full name. I have two problems doing this. 1

Re: Query Help - include

2008-05-09 Thread Ian Skinner
daniel kessler wrote: 1 - I'm not so good at sql and the join only works if there's an id in the approved_by field. This is going to be empty unless the ticket has been approved, but I still want it to work whether it's approved or not. Is that an outter join? Yes it will be an LEFT

Re: Query Help - include

2008-05-09 Thread daniel kessler
I had continued to try and figure it out after I sent the email. I did figure out a way to make it work. FROM expenditures e, people p WHERE e.approved_by = people.id (+) In Oracle, the + does the outer join. And it worked well, but it wasn't explicit. I don't know sql well enough to read

Re: Query Help - include

2008-05-09 Thread Ian Skinner
daniel kessler wrote: I had continued to try and figure it out after I sent the email. I did figure out a way to make it work. FROM expenditures e, people p WHERE e.approved_by = people.id (+) In Oracle, the + does the outer join. Yes, that is the original outer join syntax for Oracle.