Hi Guys,
I need to do an inner join, or achieve the same results, between two tables, each from a different datasource.
ex
tbl_1
id
member_id
info_a
tbl_2
member_id
info_b
Typically, I would do it like this
<CFQUERY NAME="myquery" DATASOURCE="data1" MAXROWS=1 >
SELECT tbl_1.id as id, tbl_1.member_id as member_id, tbl_1.info_a as info_a,
tbl_2.info_b as info_b
FROM tbl_dns
INNER JOIN tbl_2 on tbl_1.member_id = tbl_2.member_id
WHERE (member_id = <CFQUERYparam value="#member_id#">)
</CFQUERY>
But I can't because there are two different data sources in play.
What's the best way to go about this?
I need to do an inner join, or achieve the same results, between two tables, each from a different datasource.
ex
tbl_1
id
member_id
info_a
tbl_2
member_id
info_b
Typically, I would do it like this
<CFQUERY NAME="myquery" DATASOURCE="data1" MAXROWS=1 >
SELECT tbl_1.id as id, tbl_1.member_id as member_id, tbl_1.info_a as info_a,
tbl_2.info_b as info_b
FROM tbl_dns
INNER JOIN tbl_2 on tbl_1.member_id = tbl_2.member_id
WHERE (member_id = <CFQUERYparam value="#member_id#">)
</CFQUERY>
But I can't because there are two different data sources in play.
What's the best way to go about this?