English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

A join operation uses a single SELECT statement to return a result set from multiple tables. The re are two main types of JOIN operations:
- INNER JOIN includes in the result set only records that are present in both tables
- OUTER JOIN includes in the result set all records in one of the tables.

ColdFusion does not support OUTER JOINs, nor does it support the INNER JOIN syntax. But you can use this syntax.

SELECT ColumnA, ColumnB
FROM TableA,TableB
WHERE TableA.The_ID = TableB.The_ID;

Thats a normal Join within Coldfusion. What your doing is joining two tables where the ID from tablea equals to the ID in table B

2006-06-13 03:53:50 · answer #1 · answered by ? 6 · 0 1

As a seasoned CF programmer, here's the advice that I can give you. Depending on the database you use, the same SQL that you generate that works on your DB, it will work within ColdFusion as well. Take whatever JOIN SQL that you might have, and put it within the tag and it will work just like it does within the database itself.

And I hate to have to disagree with the above poster, but ColdFusion does NOT dictate whether or not OUTER JOINS work. ColdFusion just sends the request to whatever database you use. So if your RDBM allows joins, they will work when you call the SQL from within your ColdFusion template.

2006-06-16 15:17:10 · answer #2 · answered by ps3sucks 2 · 0 0

fedest.com, questions and answers