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
5 1850
where is this table PUBLICHOUSEBEER ?
Beername is not a field in publichousebeer .check it
You dont have PublicHouseID column as well in the publichousebeer table.
Create the table properly with required fields
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
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??
Sign in to post your reply or Sign up for a free account.
Similar topics |
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!
|
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
|
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
|
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
|
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...
| |
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...
|
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...
|
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
|
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
------------------------------------------------------------------------
|
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...
|
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,...
| |
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...
|
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,...
|
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...
|
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...
|
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();...
|
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
| |
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...
| |