473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

AW: Query with inner join (Help!)

------=_NextPart_000_0011_01C36322.2FEF5DC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
It works!=20
SELECT Customers.Name, Customers.City, Orders.Product, Order.Price
FROM Customers INNER JOIN Orders ON Customers.cust_id =3D Orders.cust_id
WHERE cust_id =3D 2;

Thanks a lot.

-----Urspr=FCngliche Nachricht-----
Von: Egor Egorov [mailto:eg*********@ensita.net]=20
Gesendet: Freitag, 15. August 2003 10:14
An: my***@lists.mysql.com
Betreff: Re: Query with inner join (Help!)

"B. Fongo" <my****@fongo.de> wrote:
=20
I ' m trying to extra some information from 2 tables using inner join,
but receive an error warning. Am newbie so I' m not able to feature out why my queries don't work.
=20
Scenario:
=20
I have 2 tables: Customers and orders. The have following structures:
Customers Orders
cust_id Product
Name Price
City cust_id
=20
=20
All that am trying to get out of these tables is to use a cust_id of a
given customer to extract their orders. So I use something like this:
=20
SELECT Customers.Name, Customers.City, Orders.Product, Order.Price from Customers WHERE cust_id =3D 2 inner join Orders ON Customers.cust_id = =3D Orders.cust_id
=20
Can anyone help me on this?


SELECT Customers.Name, Customers.City, Orders.Product, Order.Price
FROM Customers INNER JOIN Orders ON Customers.cust_id =3D
Orders.cust_id
WHERE cust_id =3D 2;

--=20
For technical support contracts, goto
https://order.mysql.com/?ref=3Densita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ Eg*********@ensita.net
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com


--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dmy****@fongo.de
------=_NextPart_000_0011_01C36322.2FEF5DC0--
Jul 19 '05 #1
0 1516

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

Similar topics

7
by: Barry Young | last post by:
I am using Access to create a SQL query. It creates an Inner Join Query. I cut and paste the query into PL-SQL. When I try to execute the query I get an error. ORA 933 SQL command not properly...
0
by: B. Fongo | last post by:
------=_NextPart_000_0007_01C36311.DEE8D2E0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello! I ' m trying to extra some information from 2 tables using...
3
by: Ike | last post by:
Oh I have a nasty query which runs incredibly slowly. I am running MySQL 4.0.20-standard. Thus, in trying to expedite the query, I am trying to set indexes in my tables. My query requires four...
10
by: deko | last post by:
I've tried each of the below, but no luck. UPDATE tblEntity As tbl INNER JOIN search3220 As qry ON tbl.Entity_ID = qry.Entity_ID SET tbl.Cat_ID = 289; UPDATE tblEntity INNER JOIN search3220 ON...
6
by: dmonroe | last post by:
hi group -- Im having a nested inner join problem with an Access SQl statement/Query design. Im running the query from ASP and not usng the access interface at all. Here's the tables: ...
52
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...
3
by: Zeff | last post by:
Hi all, I have a relational database, where all info is kept in separate tables and just the id's from those tables are stored in one central table (tblMaster)... I want to perform a query, so...
12
by: Chamnap | last post by:
Hello, everyone I have one question about the standard join and inner join, which one is faster and more reliable? Can you recommend me to use? Please, explain me... Thanks Chamnap
3
by: Anila | last post by:
Hi Friends, My problem with Inner join is ... first i joined two tables and i got the result. after that iam trying to join one more table its giving syn tax error in JOIN condition. ...
0
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
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
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...

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.