473,765 Members | 2,066 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
12 18674
<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, T.label AS teamLabel
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 U.userID = UTA.userID)
LEFT JOIN Team T ON T.teamID = UTA.teamID
WHERE U.userID > 1
ORDER BY #orderBy# #orderByTxt#
</cfquery>

This is how I formed it and got a "too few parameters expected 1" error. Is
there anything you can do with this?

Phil
"Marc" <M.***********@ uva.nl> wrote in message
news:ae******** *************** **@posting.goog le.com...
"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 #11
Sorry, Bob, your query produced the following error:

Error Occurred While Processing Request
Error Executing Database Query.
[MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC
Microsoft Access Driver] Syntax error in JOIN operation.

The Error Occurred in
C:\CFusionMX\ww wroot\sowhat\qu ill\user.cfc: line 147
Called from C:\CFusionMX\ww wroot\sowhat\qu ill\user.cfm: line 114
Called from C:\CFusionMX\ww wroot\sowhat\qu ill\index.cfm: line 3
Called from C:\CFusionMX\ww wroot\sowhat\qu ill\user.cfc: line 147
Called from C:\CFusionMX\ww wroot\sowhat\qu ill\user.cfm: line 114
Called from C:\CFusionMX\ww wroot\sowhat\qu ill\index.cfm: line 3

145 : )
146 : ORDER BY #orderBy# #orderByTxt#
147 : </cfquery>
148 :
149 : <cfreturn getAll />
--------------------------------------------------------------------

SQL SELECT U.userID, U.fname, U.lname, U.phone,
U.lastLoggedIn, U.choiceId, U.experience, R.label AS roleLabel, T.label AS
teamLabel 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 ) ) ORDER BY U.lname, U.fname ASC
DATASOURCE quill
VENDORERRORCODE -3510
SQLSTATE 42000

Please Try The Following:

a.. Check the CFML Reference Manual to verify that you are using the
correct syntax.

b.. Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Remote Address 127.0.0.1
Referer
Date/Time 17-Sep-03 06:46 PM
Stack Trace (click to expand)
at
cfuser2ecfc1139 593935$funcGETA LL.runFunction( C:\CFusionMX\ww wroot\sowhat\qu i
ll\user.cfc:147 ) at
cfuser2ecfm1139 593977.runPage( C:\CFusionMX\ww wroot\sowhat\qu ill\user.cfm:11 4
) at
cfindex2ecfm985 72195.runPage(C :\CFusionMX\www root\sowhat\qui ll\index.cfm:3)
at
cfuser2ecfc1139 593935$funcGETA LL.runFunction( C:\CFusionMX\ww wroot\sowhat\qu i
ll\user.cfc:147 ) at
cfuser2ecfm1139 593977.runPage( C:\CFusionMX\ww wroot\sowhat\qu ill\user.cfm:11 4
) at
cfindex2ecfm985 72195.runPage(C :\CFusionMX\www root\sowhat\qui ll\index.cfm:3)
java.sql.SQLExc eption: [MERANT][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in JOIN
operation.
at com.merant.sequ elink.ssp.Diagn ostic.toSQLExce ption(Unknown Source)
at com.merant.sequ elink.ssp.Chain .cnvDiagnostics (Unknown Source)
at com.merant.sequ elink.ssp.Chain .decodeDiagnost ic(Unknown Source)
at com.merant.sequ elink.ssp.Chain .decodeBody(Unk nown Source)
at com.merant.sequ elink.ssp.Chain .decode(Unknown Source)
at com.merant.sequ elink.ssp.Chain .send(Unknown Source)
at com.merant.sequ elink.ctxt.stmt .StatementConte xt.send(Unknown Source)
at com.merant.sequ elink.ctxt.stmt .StmtCtxtState. _getDescribeInf o(Unknown
Source)
at com.merant.sequ elink.ctxt.stmt .CreatedStmtCtx t.getDescribeIn fo(Unknown
Source)
at com.merant.sequ elink.ctxt.stmt .StatementConte xt.getDescribeI nfo(Unknown
Source)
at com.merant.sequ elink.ctxt.stmt .StmtCtxtState. _execDirect(Unk nown Source)
at com.merant.sequ elink.ctxt.stmt .CreatedStmtCtx t.execDirect(Un known
Source)
at com.merant.sequ elink.ctxt.stmt .StatementConte xt.execDirect(U nknown
Source)
at com.merant.sequ elink.jdbc.Sequ eLinkStatement. _execute(Unknow n Source)
at com.merant.sequ elink.jdbc.Sequ eLinkStatement. execute(Unknown Source)
at jrun.sql.JRunSt atement.execute (JRunStatement. java:304)
at coldfusion.sql. Executive.execu teQuery(Unknown Source)
at coldfusion.sql. Executive.execu teQuery(Unknown Source)
at coldfusion.sql. SqlImpl.execute (Unknown Source)
at coldfusion.tage xt.sql.QueryTag .doEndTag(Unkno wn Source)
at
cfuser2ecfc1139 593935$funcGETA LL.runFunction( C:\CFusionMX\ww wroot\sowhat\qu i
ll\user.cfc:147 )
at coldfusion.runt ime.UDFMethod.i nvoke(Unknown Source)
at coldfusion.runt ime.UDFMethod$R eturnTypeFilter .invoke(Unknown Source)
at coldfusion.runt ime.UDFMethod$A rgumentCollecti onFilter.invoke (Unknown
Source)
at coldfusion.filt er.FunctionAcce ssFilter.invoke (Unknown Source)
at coldfusion.runt ime.UDFMethod.r unFilterChain(U nknown Source)
at coldfusion.runt ime.UDFMethod.i nvoke(Unknown Source)
at coldfusion.runt ime.TemplatePro xy.invoke(Unkno wn Source)
at coldfusion.runt ime.CfJspPage._ invoke(Unknown Source)
at
cfuser2ecfm1139 593977.runPage( C:\CFusionMX\ww wroot\sowhat\qu ill\user.cfm:11 4
)
at coldfusion.runt ime.CfJspPage.i nvoke(Unknown Source)
at coldfusion.tage xt.lang.Include Tag.doStartTag( Unknown Source)
at coldfusion.runt ime.CfJspPage._ emptyTag(Unknow n Source)
at
cfindex2ecfm985 72195.runPage(C :\CFusionMX\www root\sowhat\qui ll\index.cfm:3)
at coldfusion.runt ime.CfJspPage.i nvoke(Unknown Source)
at coldfusion.tage xt.lang.Include Tag.doStartTag( Unknown Source)
at coldfusion.filt er.CfincludeFil ter.invoke(Unkn own Source)
at coldfusion.filt er.ApplicationF ilter.invoke(Un known Source)
at coldfusion.filt er.PathFilter.i nvoke(Unknown Source)
at coldfusion.filt er.LicenseFilte r.invoke(Unknow n Source)
at coldfusion.filt er.ExceptionFil ter.invoke(Unkn own Source)
at coldfusion.filt er.ClientScopeP ersistenceFilte r.invoke(Unknow n Source)
at coldfusion.filt er.BrowserFilte r.invoke(Unknow n Source)
at coldfusion.filt er.GlobalsFilte r.invoke(Unknow n Source)
at coldfusion.filt er.DatasourceFi lter.invoke(Unk nown Source)
at coldfusion.CfmS ervlet.service( Unknown Source)
at jrun.servlet.Se rvletInvoker.in voke(ServletInv oker.java:106)
at jrun.servlet.JR unInvokerChain. invokeNext(JRun InvokerChain.ja va:42)
at
jrun.servlet.JR unRequestDispat cher.invoke(JRu nRequestDispatc her.java:241)
at
jrun.servlet.Se rvletEngineServ ice.dispatch(Se rvletEngineServ ice.java:527)
at jrun.servlet.ht tp.WebService.i nvokeRunnable(W ebService.java: 172)
at
jrunx.scheduler .ThreadPool$Dow nstreamMetrics. invokeRunnable( ThreadPool.java :
348)
at
jrunx.scheduler .ThreadPool$Thr eadThrottle.inv okeRunnable(Thr eadPool.java:45 1
)
at
jrunx.scheduler .ThreadPool$Ups treamMetrics.in vokeRunnable(Th readPool.java:2 9
4)
at jrunx.scheduler .WorkerThread.r un(WorkerThread .java:66)

This is the query:

<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, T.label AS teamLabel
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
)
)
ORDER BY #orderBy# #orderByTxt#
</cfquery>

Hm.m...

Phil
"Bob Quintal" <bq******@gener ation.net> wrote in message
news:3c******** *************** *******@news.te ranews.com...
"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 #12
"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.


You're trying to use a variation of something like Oracle SQL on
Access. Ain't gonna work. Ever. All joins in Access are in the FROM
clause, not the WHERE clause. Try building the query in Access and
then porting/pasting to CF.
Nov 12 '05 #13

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

Similar topics

6
2572
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
18563
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
6106
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
3284
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
6348
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
2730
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
2114
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
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
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
9835
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
8833
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...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
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
5277
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...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2806
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.