Subsribe to our RSS

latest reactions

Montana Flynn
haha …
some1
Hi, Thank you for help me testing my sit …
metin2 yang
it is very nice …
Tjarko
I would'nt use cfhtmlhead for anything ; …
Sebastiaan
Hi Tjarko,Would you suggest injecting…

Use OpenDNS

mxna feeds

A Special ColdFusion Builder Event in Tampa, FLColdFusion Contract Job in Marbella, SpainColdFusion Job Opportunity in West London, United KingdomColdFusion Job Opportunity in Bethesda, MDColdFusion Job Opportunity in Springfield, MOColdFusion Job Opportunity in Seattle, WAColdFusion Builder - RefactoringColdFusion Job Opportunity in Raleigh, NCColdFusion Job Opportunity in Quincy, MAColdFusion Job Opportunity in Memphis, TNColdFusion Job Opportunity in San Antonio, TXUsing Base64 Canvas Data In jQuery To Create ColdFusion ImagesMy move from using cfhttp and rssatom.cfc to cffeed.Infinite entities, cfgrid and one cfc to handle the dataJob: ColdFusion Developer - Marbella, Spain

All files are strictly confidential: all information is classified.
© Copyright 2002 - 2010 mximize.com.
All right reserved.

MXNA webfeed

Visit Carlos GallupaPowered by ColdFusion MX

Multiple conditions in JOIN statement

You can put multiple conditions in your LEFT, RIGHT and INNER/OUTER joins if you want.. below a small example that will give you the idea.

SELECT tbl.id, tblo.naam
FROM sometable tbl
  LEFT JOIN someothertable tblo ON tblo.id = tbl.id
   AND tblo.function = tbl.function
ORDER BY ....

Didn't know this one.. could have saved me a lotta query's in the past :-(

13598 viewed | 5 opinion(s)  | del.icio.us | Digg it | Tjarko @ 01/06/05 0:00 cet


Reactions:

nidhi wrote.... (mail)

it doesnt work !! dont misguide people with such posts!

14 March 2009 16:12 cet  

Tjarkowrote....

It works in sql server and oracle. Its probably your way of coding or your database.

14 March 2009 16:22 cet  

Bio wrote....

multiple conditions on a join is commonplace...or did i miss something?

20 April 2009 15:16 cet  

wese wrote.... (site)

It does work, as long as you know what your doing.
Joining on multiple columns doesn't work properly (5.0).
Adding extra conditions does.

03 June 2009 15:10 cet  

Johny wrote.... (site)

Never tried to join on multiple columns, just with extra condition, but i think also multiple columns should work.

15 October 2009 19:13 cet  

Leave your comment

Your name


Your url/website/link/email....


Some room for your reaction is placed here..



The answer to the ultimate question is?? (42 ;-))




URL en mail addresses are translated for you... life sometimes is that simple!!