I am trying to create a query to use as a report record source. Below is
what I want to do (this was tested and works with a MySQL web script):
SELECT
contacts.id,
contacts.email,
contacts.first_name,
contacts.last_name,
contacts.middle_name,
contacts.company,
contacts.address,
contacts.address2,
contacts.city,
contacts.state,
contacts.country,
contacts.zip,
contacts.phone,
contacts.website,
contacts.how_found,
contacts.specific_other,
contacts.comments,
contacts.submitted,
contacts.mail_list,
contacts.travel_dates,
interests.name
FROM contacts, interests
LEFT JOIN idx_interest ON idx_interest.contact_id = contacts.id
WHERE idx_interest.interest_id = interests.id
To create the query, I click on the new query button, select design
view, switch to SQL view, then paste this in. When I try to save the
query, I get a "Syntax error in JOIN operation" message. When I click
OK, Access highlights the "contacts" part of "SELECT contacts.id". I am
using Access 2002 (10.6501.6626) SP3.
Any help is greatly appreciated,
TIA
--
Justin Koivisto - sp**@koivi.com http://www.koivi.com 16 1529
On Wed, 08 Sep 2004 22:01:59 GMT, Justin Koivisto <sp**@koivi.com>
wrote: I am trying to create a query to use as a report record source. Below is what I want to do (this was tested and works with a MySQL web script):
SELECT contacts.id,
[ ... more fields ]
interests.name FROM contacts, interests LEFT JOIN idx_interest ON idx_interest.contact_id = contacts.id WHERE idx_interest.interest_id = interests.id
To create the query, I click on the new query button, select design view, switch to SQL view, then paste this in. When I try to save the query, I get a "Syntax error in JOIN operation" message. When I click OK, Access highlights the "contacts" part of "SELECT contacts.id". I am using Access 2002 (10.6501.6626) SP3.
Any help is greatly appreciated,
TIA
This is quite different from Access syntax. Here is how I would try to
do it (air code, not tested):
SELECT
contacts.id,
< ...more fields ...>,
interests.name
FROM contacts
LEFT JOIN interests ON contacts.id = interests.id;
HTH
Matthias Kläy
-- www.kcc.ch
"Justin Koivisto" <sp**@koivi.com> wrote in message
news:rj*****************@news7.onvoy.net... I am trying to create a query to use as a report record source. Below is what I want to do (this was tested and works with a MySQL web script):
SELECT contacts.id, contacts.email, contacts.first_name, contacts.last_name, contacts.middle_name, contacts.company, contacts.address, contacts.address2, contacts.city, contacts.state, contacts.country, contacts.zip, contacts.phone, contacts.website, contacts.how_found, contacts.specific_other, contacts.comments, contacts.submitted, contacts.mail_list, contacts.travel_dates, interests.name FROM contacts, interests LEFT JOIN idx_interest ON idx_interest.contact_id = contacts.id WHERE idx_interest.interest_id = interests.id
To create the query, I click on the new query button, select design view, switch to SQL view, then paste this in. When I try to save the query, I get a "Syntax error in JOIN operation" message. When I click OK, Access highlights the "contacts" part of "SELECT contacts.id". I am using Access 2002 (10.6501.6626) SP3.
Any help is greatly appreciated,
TIA
This newsgroup is for _Access Morons_ not MySQL Morons.
Matthias Klaey wrote: On Wed, 08 Sep 2004 22:01:59 GMT, Justin Koivisto <sp**@koivi.com> wrote:
I am trying to create a query to use as a report record source. Below is what I want to do (this was tested and works with a MySQL web script):
SELECT contacts.id,
[ ... more fields ]
interests.name
FROM contacts, interests
LEFT JOIN idx_interest ON idx_interest.contact_id = contacts.id WHERE idx_interest.interest_id = interests.id
To create the query, I click on the new query button, select design view, switch to SQL view, then paste this in. When I try to save the query, I get a "Syntax error in JOIN operation" message. When I click OK, Access highlights the "contacts" part of "SELECT contacts.id". I am using Access 2002 (10.6501.6626) SP3.
Any help is greatly appreciated,
TIA
This is quite different from Access syntax. Here is how I would try to do it (air code, not tested):
SELECT contacts.id, < ...more fields ...>, interests.name FROM contacts LEFT JOIN interests ON contacts.id = interests.id;
That wouldn't work, contacts.id is a person, interests.id is something
they may be interested in the idx_insterst table holds relations between
the two... Below is a quick example of how it is set up:
TABLE STRUCTURES:
contacts
--------
id int
name varchar
email varchar
interests
---------
id int
name varchar
idx_interest
------------
interest_id int
contact_id int
TABLE DATA
contacts
--------
1,justin,ju****@example.com
2,zach,za**@example.com
3,josh,jo**@example.com
4,jw,jw@example.com
5,joe,jo*@example.com
interests
---------
1,sql
2,php
3,design
4,sales
5,print
6,web
7,applications
idx_interest
------------
1,1
1,2
1,3
1,6
2,1
2,6
3,3
3,5
3,6
4,4
4,5
What I am after is:
+---------------------------------------------+
| name | email | interest |
+---------------------------------------------+
| justin | ju****@example.com | sql |
+---------------------------------------------+
| justin | ju****@example.com | php |
+---------------------------------------------+
| justin | ju****@example.com | design |
+---------------------------------------------+
| justin | ju****@example.com | web |
+---------------------------------------------+
| zach | za**@example.com | sql |
+---------------------------------------------+
| zach | za**@example.com | web |
+---------------------------------------------+
| josh | jo**@example.com | design |
+---------------------------------------------+
| josh | jo**@example.com | print |
+---------------------------------------------+
| josh | jo**@example.com | web |
+---------------------------------------------+
| jw | jw@example.com | sales |
+---------------------------------------------+
| jw | jw@example.com | print |
+---------------------------------------------+
Anyway, works fine with MySQL, just wondering where the JOIN sytax error
comes from...
--
Justin Koivisto - sp**@koivi.com http://www.koivi.com
XMVP wrote: This newsgroup is for _Access Morons_ not MySQL Morons.
With responses like this, it's no wonder people think I'm crazy for
actually posting to a MS-related newsgroup.
That being said, I am a moron of the 5th degree since linux, apache,
php, mysql, windows and access are all involved in the project...
I'm sorry to hear that you are just as moronic as I since you don't know
what the problem is either. :\
--
Justin Koivisto - sp**@koivi.com http://www.koivi.com
On Thu, 09 Sep 2004 13:31:53 GMT, Justin Koivisto <sp**@koivi.com>
wrote: Matthias Klaey wrote: On Wed, 08 Sep 2004 22:01:59 GMT, Justin Koivisto <sp**@koivi.com> wrote:
I am trying to create a query to use as a report record source. Below is what I want to do (this was tested and works with a MySQL web script):
SELECT contacts.id, [ ... more fields ]
interests.name
FROM contacts, interests
LEFT JOIN idx_interest ON idx_interest.contact_id = contacts.id WHERE idx_interest.interest_id = interests.id
To create the query, I click on the new query button, select design view, switch to SQL view, then paste this in. When I try to save the query, I get a "Syntax error in JOIN operation" message. When I click OK, Access highlights the "contacts" part of "SELECT contacts.id". I am using Access 2002 (10.6501.6626) SP3.
Any help is greatly appreciated,
TIA
This is quite different from Access syntax. Here is how I would try to do it (air code, not tested):
SELECT contacts.id, < ...more fields ...>, interests.name FROM contacts LEFT JOIN interests ON contacts.id = interests.id;
That wouldn't work, contacts.id is a person, interests.id is something they may be interested in the idx_insterst table holds relations between the two... Below is a quick example of how it is set up:
TABLE STRUCTURES: contacts -------- id int name varchar email varchar
interests --------- id int name varchar
idx_interest ------------ interest_id int contact_id int
TABLE DATA contacts -------- 1,justin,ju****@example.com 2,zach,za**@example.com 3,josh,jo**@example.com 4,jw,jw@example.com 5,joe,jo*@example.com
interests --------- 1,sql 2,php 3,design 4,sales 5,print 6,web 7,applications
idx_interest ------------ 1,1 1,2 1,3 1,6 2,1 2,6 3,3 3,5 3,6 4,4 4,5
What I am after is:
+---------------------------------------------+ | name | email | interest | +---------------------------------------------+ | justin | ju****@example.com | sql | +---------------------------------------------+ | justin | ju****@example.com | php | +---------------------------------------------+ | justin | ju****@example.com | design | +---------------------------------------------+ | justin | ju****@example.com | web | +---------------------------------------------+ | zach | za**@example.com | sql | +---------------------------------------------+ | zach | za**@example.com | web | +---------------------------------------------+ | josh | jo**@example.com | design | +---------------------------------------------+ | josh | jo**@example.com | print | +---------------------------------------------+ | josh | jo**@example.com | web | +---------------------------------------------+ | jw | jw@example.com | sales | +---------------------------------------------+ | jw | jw@example.com | print | +---------------------------------------------+
Ok, I see. I tried it both in native Jet mode and ANSI-92 mode, your
SQL gives an "amiguous outer join" error in both cases.
The following works:
SELECT contacts.id, contacts.email, contacts.name, interests.name
FROM (contacts INNER JOIN idx_interest
ON contacts.id = idx_interest.contact_id)
LEFT JOIN interests
ON idx_interest.interest_id = interests.id;
Make that a LEFT JOIN instead of an INNER JOIN if you want to see all
the contacts, even if they have not interest.
Anyway, works fine with MySQL, just wondering where the JOIN sytax error comes from...
These are the joys of portability ... :-)
HTH
Matthias Kläy
-- www.kcc.ch
"Justin Koivisto" <sp**@koivi.com> wrote in message
news:b3*****************@news7.onvoy.net... XMVP wrote: This newsgroup is for _Access Morons_ not MySQL Morons.
With responses like this, it's no wonder people think I'm crazy for actually posting to a MS-related newsgroup.
That being said, I am a moron of the 5th degree since linux, apache, php, mysql, windows and access are all involved in the project...
I'm sorry to hear that you are just as moronic as I since you don't know what the problem is either. :\
-- Justin Koivisto - sp**@koivi.com http://www.koivi.com
No relation to Microsoft! Except for a few brain dead Microsoft MVPs who
wander into this newsgroup looking for newbies to fleece.
The morons here usually stick to Access and Jet. Sometimes they go off on
MS SQL Server--way out of their league!
The project you describe is a huge mess. You (or your company) will never
make any money. No matter how much junk software you cobble together, you
still have a pile of junk. Take it all to the town dump. (That's the
answer to your problem, in case you missed it.)
Matthias Klaey wrote: On Thu, 09 Sep 2004 13:31:53 GMT, Justin Koivisto <sp**@koivi.com> wrote:
Matthias Klaey wrote:
On Wed, 08 Sep 2004 22:01:59 GMT, Justin Koivisto <sp**@koivi.com> wrote:
I am trying to create a query to use as a report record source. Below is what I want to do (this was tested and works with a MySQL web script):
SELECT contacts.id,
[ ... more fields ]
interests.name
FROM contacts, interests
LEFT JOIN idx_interest ON idx_interest.contact_id = contacts.id WHERE idx_interest.interest_id = interests.id
To create the query, I click on the new query button, select design view, switch to SQL view, then paste this in. When I try to save the query, I get a "Syntax error in JOIN operation" message. When I click OK, Access highlights the "contacts" part of "SELECT contacts.id". I am using Access 2002 (10.6501.6626) SP3.
This is quite different from Access syntax. Here is how I would try to do it (air code, not tested):
SELECT contacts.id, < ...more fields ...>, interests.name FROM contacts LEFT JOIN interests ON contacts.id = interests.id; That wouldn't work, contacts.id is a person, interests.id is something they may be interested in the idx_insterst table holds relations between the two... Below is a quick example of how it is set up:
<snip table and data structures>
Ok, I see. I tried it both in native Jet mode and ANSI-92 mode, your SQL gives an "amiguous outer join" error in both cases.
Wonder why I didn't get that message and only "Syntax error in JOIN
operation"...
The following works:
SELECT contacts.id, contacts.email, contacts.name, interests.name FROM (contacts INNER JOIN idx_interest ON contacts.id = idx_interest.contact_id) LEFT JOIN interests ON idx_interest.interest_id = interests.id;
Like a charm - THANKS!
Anyway, works fine with MySQL, just wondering where the JOIN sytax error comes from...
These are the joys of portability ... :-)
It seems that's all I've been doing lately... we've got a bunch of
people who suddenly decide that they like the way Access prints out
mailing labels. That's really the only reason I have to port these darn
systems. I left the MS/VB development scene in about '96 - needless to
say, most of what I learned 8 years ago is worthless now. :\ I've only
recently gotten into the whole SQL thing, so I still struggle with some
JOIN and GROUP BY statements. Eventually I'll get the hang of it.
Thanks again for the help!
--
Justin Koivisto - sp**@koivi.com http://www.koivi.com
XMVP wrote: "Justin Koivisto" <sp**@koivi.com> wrote in message news:b3*****************@news7.onvoy.net...
XMVP wrote:
This newsgroup is for _Access Morons_ not MySQL Morons.
With responses like this, it's no wonder people think I'm crazy for actually posting to a MS-related newsgroup.
That being said, I am a moron of the 5th degree since linux, apache, php, mysql, windows and access are all involved in the project...
I'm sorry to hear that you are just as moronic as I since you don't know what the problem is either. :\
No relation to Microsoft! Except for a few brain dead Microsoft MVPs who wander into this newsgroup looking for newbies to fleece.
The morons here usually stick to Access and Jet. Sometimes they go off on MS SQL Server--way out of their league!
The project you describe is a huge mess. You (or your company) will never make any money. No matter how much junk software you cobble together, you still have a pile of junk. Take it all to the town dump. (That's the answer to your problem, in case you missed it.)
I'll be sure to relay the message - especially since you're up on all
the details of the project.
--
Justin Koivisto - sp**@koivi.com http://www.koivi.com
Justin Koivisto <sp**@koivi.com> wrote: XMVP wrote: This newsgroup is for _Access Morons_ not MySQL Morons.
With responses like this, it's no wonder people think I'm crazy for actually posting to a MS-related newsgroup.
XMVP is a well known troll. We heartily wish he would go away. Please ignore him.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at http://www.granite.ab.ca/accsmstr.htm
Tony Toews wrote: Justin Koivisto <sp**@koivi.com> wrote:
XMVP wrote:
This newsgroup is for _Access Morons_ not MySQL Morons.
With responses like this, it's no wonder people think I'm crazy for actually posting to a MS-related newsgroup.
XMVP is a well known troll. We heartily wish he would go away. Please ignore him.
Thought as much.
--
Justin Koivisto - sp**@koivi.com http://www.koivi.com
"Justin Koivisto" <sp**@koivi.com> wrote in message
news:67*****************@news7.onvoy.net... Tony Toews wrote:
Justin Koivisto <sp**@koivi.com> wrote:
XMVP wrote:
This newsgroup is for _Access Morons_ not MySQL Morons.
With responses like this, it's no wonder people think I'm crazy for actually posting to a MS-related newsgroup. XMVP is a well known troll. We heartily wish he would go away.
Please ignore him. Thought as much.
Tony's from Duluth too!
"Anonymous Sender" <an*******@remailer.metacolo.com> wrote XMVP, IBM today announced. . .
Directly quoted from the headers of the referenced post:
Comments: This message did not originate from the Sender address above. It was re- mailed automatically by anonymizing remailer software.
Just another alias, or sockpuppet, of The Resident Troll, as is the "XMVP"
to whom this alias addresses the message.
"Anonymous Sender" <an*******@remailer.metacolo.com> wrote in message
news:78******************************@remailer.met acolo.com... In article <Ut********************@vnet-inc.com> "XMVP" <ac***********@hotmail.com> wrote:
"Justin Koivisto" <sp**@koivi.com> wrote in message news:b3*****************@news7.onvoy.net... XMVP wrote: > This newsgroup is for _Access Morons_ not MySQL Morons.
With responses like this, it's no wonder people think I'm crazy for actually posting to a MS-related newsgroup.
That being said, I am a moron of the 5th degree since linux, apache, php, mysql, windows and access are all involved in the project...
I'm sorry to hear that you are just as moronic as I since you don't
know what the problem is either. :\
-- Justin Koivisto - sp**@koivi.com http://www.koivi.com
No relation to Microsoft! Except for a few brain dead Microsoft MVPs
who wander into this newsgroup looking for newbies to fleece.
The morons here usually stick to Access and Jet. Sometimes they go off
on MS SQL Server--way out of their league!
The project you describe is a huge mess. You (or your company) will
never make any money. No matter how much junk software you cobble together,
you still have a pile of junk. Take it all to the town dump. (That's the answer to your problem, in case you missed it.)
[insert Tony Toews boilerplate here]
XMVP, IBM today announced some kinduv new-fangled Linux-oriented database thingamabob. Do you know if it is intended to be an Access killer? Thank you, and your directness is appreciated.
That would be DB2 Version 8.2, AKA "Stinger." But AFAIK, it ain't "open
farce." That'd be "Cloudscape," released earlier this month. DB2 has a
mom and pop version for $500 then it shoots to $25K for the enterprise
version. Cloudscape (cute name, huh?) is actually middleware meant to be
embedded in a project, usually some Java junkpile. It's supposedly a fully
functional little (2Mb) database. It's also open farce.
Maybe you saw where IBM was going to use the AMD dual-core? That's because
we're going to be running "real" operating systems next to junk operating
systems in the future. Intel will go multi-core next year and by 2006, 60%
of all Intel CPU's with be multi-core. So you can run your good stuff in
one core and your open farce stuff in another core.
Apache-DB2-Linux-MySQL--All junk for the "alternative people" which are the
LOST ONES like Justin here. They're just goofy and poor.
And besides all that junk is so far behind the database curve it's pathetic.
I've been testing betas of Visual Studio 2005 and SQL Server 2005 for about
a month now and it's like whoa dude--what a ride! The alternative people
with their open farce stuff can eat my dust!
"Tony Toews" <tt****@telusplanet.net> wrote in message
news:es********************************@4ax.com...
Tony the Twinkie, pasting together
The words of a post that no one will hear.
No one comes near.
Look at him working, pulling his pud
In the night when there's nobody there.
What does he care?
All the Access homos,
Where do they all come from?
All the Access homos,
Where do they all belong?
XMVP wrote: Apache-DB2-Linux-MySQL--All junk for the "alternative people" which are the LOST ONES like Justin here. They're just goofy and poor.
And besides all that junk is so far behind the database curve it's pathetic. I've been testing betas of Visual Studio 2005 and SQL Server 2005 for about a month now and it's like whoa dude--what a ride! The alternative people with their open farce stuff can eat my dust!
....like Google, Amazon, eBay, Pepsi, Yahoo who all use PHP in their
websites and Apple - the base their OS X operating system is a
open-source BSD.
Check out how many "goofy and poor" we have: http://www.securityspace.com/s_surve...408/index.html
--
Justin Koivisto - sp**@koivi.com http://www.koivi.com
>X-Abuse-Report: http://www.usenetabuse.com
The above posting was *NOT* by Arvin Meyers and is a forgery.
Please ignore the above posting and others which are somewhat bizarre.
Note to persons new to this newsgroup. One person, with many identities, is being
rather disruptive. If you see a bizarre posting it's probably the work of this
disruptive person..
Check the headers of the posting. If you see the following the posting likely can be
ignored. Of course, there will likely be other headers to be added to this list.
Comments: This message did not originate from the Sender address above.
It was remailed automatically by anonymizing remailer software.
or
X-Abuse-Report: ab***@teranews.com
or
Organization: Posted via Supernews, http://www.supernews.com
or
Organization: 100ProofNews.com - Unlimited Downloads - $8.95/Month
or
X-Complaints-To: ab***@vnet-inc.com
or
X-Abuse-Report: http://www.usenetabuse.com
You can also change your NewsReader program settings to ignore off-topic posts. See http://www.hyphenologist.co.uk/killfile/ for more information.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at http://www.granite.ab.ca/accsmstr.htm This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: David |
last post by:
Hi,
I want to work with Access 2002.
I will need to be able to distribute my application to users that may
still have access 2000 on their computers. I know access 2002 has a
function that...
|
by: -Michelle- |
last post by:
Hi
I am using A2003 on XP. The client has A2000. So I have ensured that I have
developed based on A2000 and compiled as such.
I have found that in a number of cases now, I have used (what I...
|
by: Richard Holliingsworth |
last post by:
Hello:
Thanks for reading this. We just converted to A2002 and some of my
querries have stopped working and I can't figure out why.
Basically, anything with a "NOT" is not working.
For...
|
by: Wayne Aprato |
last post by:
I have several Access 2003 mde databases. When I try to open them in
Access 2002 I get the following error:
"The Visual Basic for Applications project in the database is
corrupt."
...
|
by: Paul Drabik |
last post by:
I have an app written in A97. I also have sporatic users upgrading to
A2002 as they get XP on the machines.
So they need to open my A97 app. To do so, of course, I open the MDB
exclusively to...
|
by: Rob Parker |
last post by:
I posted this (with a different subjetc line) in the ms.public.access.forms
newsgroup a few days ago, but haven't had a single response there. I'm
hoping maybe someone here can help.
Using...
|
by: Rob Parker |
last post by:
I posted this with a different subject line (in two posts - I added
additional info in the second) in this newsgroup a few days ago, but
haven't had a single response. Hopefully, that was because...
|
by: robert d via AccessMonster.com |
last post by:
I develop my application on my desktop which has Access 2002 (default file
format of A2K). My client uses A2K so I have installed A2K on my laptop.
Recently when developing in A2002 my front end...
|
by: tombsy |
last post by:
Hello Group.
I work for a company who is about to embark on a long awaited Office upgrade
from Office 97 to Office XP.
Office XP comes with Access 2002.
I am an accomplished Access developer...
|
by: Tom |
last post by:
All:
I posted on this yesterday, but for whatever reason, Google isn't
dealing nicely with it...
Anyway, I need to install A2000 on a computer that already has A2002
so I can create A2000 mde...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
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...
| |