473,796 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple Join Statement Help

3 New Member
I have a problem concerning a join statement query, the two table are called PublicHouse & PublicHouseBeer , below are the following tables are there attributes;

PublicHouse Table

create table "PublicHous e"
(PublicHouseID char (20),
PubName Char (20),
Address varchar (20),
Town char (20),
County varchar (20));

PublicHouse Beer;

create table "Brewer"
(BrewerName char (20),
Address varchar (20),
Town char (20),
County char (20));

The query is list all the publicHouses & related information (address etc) that supply "Ten" Beer. (Ten is the name of the beer).

Below is my attempt at the query;
Select PublicHouse.Pub licHouseID, PublicHouseBeer .BeerName, PublicHouse.Add ress
From "PublicHous e", "PublicHouseBee r"
Where (PublicHouse.Pu blicHouseID = PublicHouseBeer .PublicHouseID)
AND PublicHouseBeer .BeerName = 'Ten';

The following error message came up "PUBLICHOUSEBEE R"."BEERNAME ": invalid identifier

Any help would be very much appreciated
Oct 22 '07 #1
5 1850
debasisdas
8,127 Recognized Expert Expert
where is this table PUBLICHOUSEBEER ?
Oct 23 '07 #2
susarlasireesha
5 New Member
Beername is not a field in publichousebeer .check it
Oct 23 '07 #3
amitpatel66
2,367 Recognized Expert Top Contributor
You dont have PublicHouseID column as well in the publichousebeer table.
Create the table properly with required fields
Oct 23 '07 #4
ltansey
3 New Member
where is this table PUBLICHOUSEBEER ?
Yeah sorry, made a mistake, copy & pasted the wrong table in; the publichousebeer table looks like the following;

Public House Beer Table
create table "PublicHouseBee r"
(PublicHouseID number (20),
BrewerName char (20),
BeerName char (20),
CurrentRating char (20));

Table created.

the beername attribute is there as shown above, I looked at the query so many times, think it may be a structural problem?

I think it may need a second eye to look at
Oct 23 '07 #5
amitpatel66
2,367 Recognized Expert Top Contributor
Yeah sorry, made a mistake, copy & pasted the wrong table in; the publichousebeer table looks like the following;

Public House Beer Table
create table "PublicHouseBee r"
(PublicHouseID number (20),
BrewerName char (20),
BeerName char (20),
CurrentRating char (20));

Table created.

the beername attribute is there as shown above, I looked at the query so many times, think it may be a structural problem?

I think it may need a second eye to look at
Your query is in sync with your table structure.
I assume you are running the query from the same schema where you have created a table??
Oct 24 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
43674
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 ended. It highlights the INNER JOIN statement on the SQL command. Can someone recommend a utility to convert these Microsoft or Access SQL queries to PL SQL? Thanks!
0
381
by: LRW | last post by:
This has to do with mySQL 101. I know it's supposed to be super simple, but I'm an idiot. I can't get my join to work (1st time I've tried doing joins.) I've read http://www.mysql.com/doc/en/JOIN.html, but I'm just not groking it. When I try to do the same thing, I can't "convert" one field into the data from another. Here's what I have. To test this concept I made two tables on a
2
1637
by: Trent | last post by:
Hello. I am trying to execute a statement that works fine in ms sql but will not work in mysql. There are three tables. user (user_sid, user_name, user_email), file (file_sid, file_name, file_desc), file_access (file_sid, user_sid). Here is what I want: Given a particular file_sid return all users with an extra column (1,0) inticated whether or not there was a match in the file_access
6
2575
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
3
5732
by: dumbledad | last post by:
Hi All, I'm confused by how to replace a SELECT statement in a SQL statement with a specific value. The table I'm working on is a list of words (a column called "word") with an index int pointing to the sentence they come from (a column called "regret"). I also have a table of stop words (called "GenericStopWords") that contains the words I do not want to consider. That table has a single column called "word". I started off using a...
4
2074
by: d.p. | last post by:
Hi all, I'm using MS Access 2003. Bare with me on this description....here's the situation: Imagine insurance, and working out premiums for different insured properties. The rates for calculating premiums are dependant on the country in which the client is in. Therefore, we have a Country table, with its list of rates, a client table and then the property table. Getting this is great, works fine, easy! Problem is, now I need to work out a...
2
2397
by: Fendi Baba | last post by:
I created a person table with various fields such as Suffix, Salutation, etc, Some of these fields may not be mandatory for example suffix. In the actual table itself, I only have a field for suffix ID where 1=Phd, 2= MD. To display all of these to the user, I created a form with an underlying query. The problem I am encountering is this, when we have an empty field, for example where ID="", the query returns nothing. How do i work around...
52
6359
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
1
7532
by: peaceburn | last post by:
Hi, I'm gonna pull my hair in the coming days with these DB2 stored procedures. So the issue, let's assume a simple stored procedure like this : CREATE PROCEDURE MYSCHEMA.PROCEDURE1 ( ) DYNAMIC RESULT SETS 1 ------------------------------------------------------------------------
0
9685
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
9535
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
10467
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10201
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
9061
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
7558
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
6802
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();...
1
4130
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
2931
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.