473,749 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join expression not supported - using Access 2000 and CF

<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn,
U.choiceId, U.experience, T.label AS teamLabel, R.label AS
roleLabel
FROM User U LEFT JOIN UserTeamAssoc UTA
ON UTA.userID = U.userID,
Role R, UserRoleAssoc URA, Team T
WHERE U.userID = URA.userID
AND URA.roleID = R.roleID
AND U.userId > 1
ORDER BY #orderBy# #orderByTxt#
</cfquery>

This query produces the following error:

Join expression not supported.

Has anyone else run into this problem, if so, what can I do about it? I do
not have the ability to install Access on my machine so any solution could
not involve working with Access itself (I do have the .mdb file that I use
via ColdFusion App Server)

Phil
Nov 12 '05 #1
12 18671
In article <dP1ab.183646$x f.175404@lakere ad04>,
so*****@erols.c om says...
<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn,
U.choiceId, U.experience, T.label AS teamLabel, R.label AS
roleLabel
FROM User U LEFT JOIN UserTeamAssoc UTA
ON UTA.userID = U.userID,
Role R, UserRoleAssoc URA, Team T
WHERE U.userID = URA.userID
AND URA.roleID = R.roleID
AND U.userId > 1
ORDER BY #orderBy# #orderByTxt#
</cfquery>

This query produces the following error:

Join expression not supported.

Has anyone else run into this problem, if so, what can I do about it? I do
not have the ability to install Access on my machine so any solution could
not involve working with Access itself (I do have the .mdb file that I use
via ColdFusion App Server)


It looks pretty good to me - although I always list my non
outer joined tables in the from clause first - ie:

FROM Role R, UserRoleAssoc URA, Team T, User U
LEFT JOIN UserTeamAssoc UTA
ON UTA.userID = U.userID

I dunno if that matters though...

--
Cam
Nov 12 '05 #2
That didn't work it produced a "join expression not supported' error

<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn,
U.choiceId, U.experience, R.label AS roleLabel
FROM Role R, UserRoleAssoc URA, Team T, User U
LEFT JOIN UserTeamAssoc UTA ON UTA.userID = U.userID
ORDER BY #orderBy# #orderByTxt#
</cfquery>

Phil
"Cam Penner"
<Ca************ *************** *************** ********@hotmai l.com> wrote in
message news:MP******** *************** *@News.CIS.DFN. DE...
In article <dP1ab.183646$x f.175404@lakere ad04>,
so*****@erols.c om says...
<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn,
U.choiceId, U.experience, T.label AS teamLabel, R.label AS
roleLabel
FROM User U LEFT JOIN UserTeamAssoc UTA
ON UTA.userID = U.userID,
Role R, UserRoleAssoc URA, Team T
WHERE U.userID = URA.userID
AND URA.roleID = R.roleID
AND U.userId > 1
ORDER BY #orderBy# #orderByTxt#
</cfquery>

This query produces the following error:

Join expression not supported.

Has anyone else run into this problem, if so, what can I do about it? I do not have the ability to install Access on my machine so any solution could not involve working with Access itself (I do have the .mdb file that I use via ColdFusion App Server)


It looks pretty good to me - although I always list my non
outer joined tables in the from clause first - ie:

FROM Role R, UserRoleAssoc URA, Team T, User U
LEFT JOIN UserTeamAssoc UTA
ON UTA.userID = U.userID

I dunno if that matters though...

--
Cam

Nov 12 '05 #3
In article <IT2ab.183659$x f.63322@lakerea d04>,
so*****@erols.c om says...
That didn't work it produced a "join expression not supported' error

<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn,
U.choiceId, U.experience, R.label AS roleLabel
FROM Role R, UserRoleAssoc URA, Team T, User U
LEFT JOIN UserTeamAssoc UTA ON UTA.userID = U.userID
ORDER BY #orderBy# #orderByTxt#
</cfquery>


The guy I work with just muttered something to me about
sometimes needing to surround join clauses in access with
curly braces. You might want to try looking into that.
(he's not within shouting distance right now, but if you
have more trouble I'll get him to post something)

--
Cam
Nov 12 '05 #4
SOrry that failed as well! :( He needs to shout louder!

Phil

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5
This might help, this is how I'd write it in Oracle:

<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn,
U.choiceId, U.experience, R.label AS roleLabel
FROM Role R, UserRoleAssoc URA, Team T, User U, UserTeamAssoc UTA
WHERE U.userId = URA.userID
AND URA.roleId = R.roleId
AND U.userId = UTA.userID (+)
AND T.teamId = UTA.teamID (+)
AND U.userID > 1
ORDER BY #orderBy# #orderByTxt#
</cfquery>

Phil
"Cam Penner"
<Ca************ *************** *************** ********@hotmai l.com> wrote in
message news:MP******** *************** *@News.CIS.DFN. DE...
In article <IT2ab.183659$x f.63322@lakerea d04>,
so*****@erols.c om says...
That didn't work it produced a "join expression not supported' error

<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn,
U.choiceId, U.experience, R.label AS roleLabel
FROM Role R, UserRoleAssoc URA, Team T, User U
LEFT JOIN UserTeamAssoc UTA ON UTA.userID = U.userID
ORDER BY #orderBy# #orderByTxt#
</cfquery>


The guy I work with just muttered something to me about
sometimes needing to surround join clauses in access with
curly braces. You might want to try looking into that.
(he's not within shouting distance right now, but if you
have more trouble I'll get him to post something)

--
Cam

Nov 12 '05 #6
In article <MP************ ************@Ne ws.CIS.DFN.DE>,
Cam.Penner.news 1ATpleasedontsp amgoldmedalsyst ems.com@hotmai
l.com says...
In article <IT2ab.183659$x f.63322@lakerea d04>,
so*****@erols.c om says...
That didn't work it produced a "join expression not supported' error

<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn,
U.choiceId, U.experience, R.label AS roleLabel
FROM Role R, UserRoleAssoc URA, Team T, User U
LEFT JOIN UserTeamAssoc UTA ON UTA.userID = U.userID
ORDER BY #orderBy# #orderByTxt#
</cfquery>


The guy I work with just muttered something to me about
sometimes needing to surround join clauses in access with
curly braces. You might want to try looking into that.
(he's not within shouting distance right now, but if you
have more trouble I'll get him to post something)


Try something along the lines of:
<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone,
U.lastLoggedIn,
U.choiceId, U.experience, R.label AS
roleLabel
FROM Role R, UserRoleAssoc URA, Team T, User U
{oj LEFT OUTER JOIN UserTeamAssoc UTA ON UTA.userID
= U.userID}
ORDER BY #orderBy# #orderByTxt#
</cfquery>

I'll stop guessing now if someone has the proper answer...
;)

--
Cam
Nov 12 '05 #7
"Phil Powell" <so*****@erols. com> wrote in message news:<dP1ab.183 646$xf.175404@l akeread04>...
<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn,
U.choiceId, U.experience, T.label AS teamLabel, R.label AS
roleLabel
FROM User U LEFT JOIN UserTeamAssoc UTA
ON UTA.userID = U.userID,
Role R, UserRoleAssoc URA, Team T
WHERE U.userID = URA.userID
AND URA.roleID = R.roleID
AND U.userId > 1
ORDER BY #orderBy# #orderByTxt#
</cfquery>

This query produces the following error:

Join expression not supported.

Has anyone else run into this problem, if so, what can I do about it? I do
not have the ability to install Access on my machine so any solution could
not involve working with Access itself (I do have the .mdb file that I use
via ColdFusion App Server)

Phil


Phil,

I see you don't have a join-clause for the Team-table (T).
Is the cartesian product the intention ?
If used an outer join clause, Jet probably doesn't know how to join
the Team table to this .. (the left or right side ?) Access would have
complained 'ambiguous outer join'.
I think either use an inner join in stead of left outer join +
cartesian product with Team or add a join expression for Team.
In general Access prefers explicit join-statements in stead of
implicit ones. For updatability of a query the explicit
join-statements are often one of the conditions.

Marc
Nov 12 '05 #8
"Phil Powell" <so*****@erols. com> wrote in message news:<dP1ab.183 646$xf.175404@l akeread04>...
Phil,

Sorry, I forgot to mention another 3rd option, namely to split off the
left-outer join of the 2 tables and to put it in a seperate stored
query and to use that query as a table togeter with the other tables
in an inner-join or cartesian product with the Team table.

Marc
Nov 12 '05 #9
"Phil Powell" <so*****@erols. com> wrote in
news:dP1ab.1836 46$xf.175404@la keread04:
<cfquery name="getAll" datasource="#re quest.dsn#">
SELECT U.userID, U.fname, U.lname, U.phone,
U.lastLoggedIn,
U.choiceId, U.experience, T.label AS teamLabel,
R.label AS
roleLabel
FROM User U LEFT JOIN UserTeamAssoc UTA
ON UTA.userID = U.userID,
Role R, UserRoleAssoc URA, Team T
WHERE U.userID = URA.userID
AND URA.roleID = R.roleID
AND U.userId > 1
ORDER BY #orderBy# #orderByTxt#
</cfquery> This query produces the following error:

Join expression not supported.

Has anyone else run into this problem, if so, what can I do
about it? I do not have the ability to install Access on my
machine so any solution could not involve working with Access
itself (I do have the .mdb file that I use via ColdFusion App
Server)

Phil
First you have no relation set from UTA to T. I've added what I
think you want
Second Access wants inner joins so marked, otherwise it produces
huge recordsets and then filters them through the where clause..

try:
From ((((User U INNER JOIN UserRoleAssoc URA
on U.userID = URA.userID)
INNER JOIN role R
on URA.roleID = R.roleID)
(LEFT JOIN UserTeamAssoc UTA
ON UTA.userID = U.userID
INNER JOIN team t
on T.teamID = UTA.teamID))

You may remove the now unnecessary where clauses.

If you get an error message try converting the last inner join to a
left join. Acess is sometimes picky about mixing inner and outer
joins.

Bob Q


Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2571
by: Allan | last post by:
Please help, below is my problem. Let's say I have 2 tables, a Products table and a Colors table that go as follow: Table Products prodID Name 1 shirt 2 tshirt
9
18561
by: Mike Bridge | last post by:
I am using MS Access 2003, and I typed in a query in SQL view which was working fine. Now when I open it, it gives me the error "Join expression not supported". Apparently, Access "fixed" it for me. Unfortunately, I can't correct it because when I click "OK", the window disappears. I don't see any way to open the query directly in SQL view, and both the Design and Data views exit as soon as I close the error dialog. Is there any way...
14
6103
by: Ryan | last post by:
I want to do the following SQL statement in Access. However, it won't allow me to have the secondary part of my join statement and tells me that this is not supported. OK, so Access doesn't support it, but there must be an alternative. I can add the part 'D.Dealer_Code' to the where clause, but because of the way that the statement is executed, it excludes data that I want. My SQL statement is perfectly leagal and works fine, but Access...
5
3283
by: Eitan M | last post by:
Hello, How can I do outer join in ms-access database ? Thanks :)
6
2186
by: PW | last post by:
I've created an ASP application which uses an Access database. I've created an outer join query, but for some reason the "Property_Def" column is not aligning with the "ESPN" column. They should be aligned on the ESPI common columns. In this attached image, the first lines ESPI of 010471 "ADJUSTABILITY" which should line up with the "Property_Def" column that says "An indication of whether or not the item is adjustable".
52
6340
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible variations(combination of fields), - then act on each group in some way ...eg ProcessRs (oRs as RecordSet)... the following query will get me the distinct groups
3
7985
by: pritampatil | last post by:
Hi All, I tried to run the attached query in MS-Access but its giving error "Join expression not supported" I am unable to find the cause of it till now, please try to find the same and help me. access query ---------------------------------------- SELECT dbo_CAS_CLM_MAST_TB.TRACKING_NO AS , dbo_CAS_CLM_MAST_TB.ACCOUNT_NO AS , dbo_CAS_CLM_MAST_TB.FOLLOW_UP_DT AS , dbo_CLM_COMMENT_TB.COMMENT_TX,
4
2727
by: phytorion | last post by:
i'm working in access2003 trying to bring three large tables(sys_sysobjects, sys_syscolumns, and dbo_pskeydefn) into one table filtered on by fieldname of a fourth table(table_name_master) SELECT TABLE_NAME_MASTER.F2 AS SRCE_APP_VERSION, TABLE_NAME_MASTER.F3 AS CUST_ID, sys_sysobjects.name AS TABLE_NAME, sys_syscolumns.name AS COLUMN_NAME, sys_syscolumns.colid AS COLUMN_ID, switch( dbo_PSKEYDEFN.KEYPOSN IS NULL,0,999,...
4
2113
by: markcarroll | last post by:
Right now I have the following SQL query inside of an access database: It works, but it runs VERY slowly. I figure I could speed it up if I could inculde the WHERE conditions as part of of the LEFT JOIN: Access gives me an error why I try this. Apparently, the Join expression is not supported. I was wondering if there was some work around in Access?
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.