Ask a Question related to Coldfusion Database Access, Design and Development.
-
RuBot #1
Query problem - multiple left joins??
I have an employee table, and an organization table. The employee table
contains an ouID link which always has a match in the org.table. The employee
table also has ouID2, ouID3, and ouSubID fields which do not always have a
match in the org.table. How do I create a query to access all records and
information?
<cfquery datasource = "#db#" name = "branch">
select a.lname, a.fname, a.ext, a.voicemail, a.title, c.ou, c.ouid, c.ouFax,
c.ouCell, c.ouToll
from (emptbl a, loctbl b, outbl c where a.active = 'Yes' and a.locid = b.locid
and a.ouid = c.ouid and a.active = 'Yes')
left join a.ouid2 on c.ouid left join a.ouid4 on c.ouid left join a.ouSubID on
c.ouid
order by title asc
</cfquery>
RuBot Guest
-
Beginners question on LEFT JOINS
Yeah, I know this was KINDA covered in databases, but could somebody give me a refresher of what a left join is in, say, terms of tables FOO and... -
Multiple Joins in one Query for CFGRID
Hello, I am tring to combine all 4 queries into 1 so that it will work in a CFGRID and it's a little beyond my SQL experience. I have all this... -
multiple inner joins
Hi, im a newbi to coldfusion and i need to multiple inner joins between tables in a database - some one has give me the sql version(from an old... -
[PHP] Are left joins more efficient?
THese are very different things, generally. The first join is an INNER join. It pulls all records that have the matching ids. The left join is... -
Help on Multiple JOINS
Paul Eaton wrote: Yes, unless it's Access, which is really picky about using parentheses to group the joins. If you're using Access, use the... -
Dan Bracuk #2
Re: Query problem - multiple left joins??
do a natural join to the organization table using ouID.
Then do left joins to the organization table using the other fields.
give a different alias to the organization table on each join.
Dan Bracuk Guest



Reply With Quote

