Dear All,
I have a simple join query
SELECT c1 FROM t1
INNER JOIN
t2 ON t2.c2 = t1.c2 WHERE t3.c3= t2.c3;
Which gives the expected result but I get the message
NOTICE: adding missing FROM-clause entry for table "t3"
How do I get rid of this NOTICE, i.e. how should I construct my select
query.
Many thanks
Colin
_______________ _______________ _______________ _______________ _____
Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend 3 4769 cs******@hotmai l.com ("C G") writes: Dear All,
I have a simple join query
SELECT c1 FROM t1 INNER JOIN t2 ON t2.c2 = t1.c2 WHERE t3.c3= t2.c3;
Which gives the expected result but I get the message NOTICE: adding missing FROM-clause entry for table "t3"
How do I get rid of this NOTICE, i.e. how should I construct my select query.
SELECT c1 FROM t1, t2, t3
WHERE t2.c2 = t1.c2 AND t3.c3 = t2.c3;
or
SELECT c1 FROM t1
INNER JOIN t2 ON t2.c2 = t1.c2
INNER JOIN t3 ON T3.c3 = t2.c3;
The above can also be written as
SELECT c1 FROM t1
JOIN t2 USING(c2)
JOIN t3 USING(c3);
or even
SELECT c1 FROM t1
NATURAL JOIN t2
NATURAL JOIN t3;
This last might be problematic if t3 has a column named c1.
Question:
Is there any advantage to specifying USING() rather than ON? I know
that if I do SELECT * from T1 JOIN t2 USING(col) then I only get 1
instance of col in the returned rows, but I'm wondering if there is
any advantage to the planner by specifying either USING() or ON?
--
Remove -42 for email
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 29 October 2004 08:42 am, C G wrote: Dear All,
I have a simple join query
SELECT c1 FROM t1 INNER JOIN t2 ON t2.c2 = t1.c2 WHERE t3.c3= t2.c3;
^^^^^
Your join doesn't alias anything as t3
I'd say you get rid of the notice once you replace t3 with t1 Which gives the expected result but I get the message NOTICE: adding missing FROM-clause entry for table "t3"
How do I get rid of this NOTICE, i.e. how should I construct my select query.
Many thanks
Colin
_______________ _______________ _______________ _______________ _____ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend
- --
UC
- --
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFBguJDjqG XBvRToM4RArh0AJ 46apSm5O/dX4QYJxuC44yyjY cWHQCfZpMu
+UU1SoXolAFx7fE hMUUXp5w=
=GRUr
-----END PGP SIGNATURE-----
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
On Sat, 30 Oct 2004 01:42 am, C G wrote: Dear All,
I have a simple join query
SELECT c1 FROM t1 INNER JOIN t2 ON t2.c2 = t1.c2 WHERE t3.c3= t2.c3;
Instead
SELECT c1 FROM t2, t1 INNER JOIN t2 ON t2.c2 = t1.c2 WHERE t3.c3=t2.c3
OR
SELECT c1 FROM t1 INNER JOIN t2 ON t2.c2 = t1.c2 JOIN t3 ON t3.c3 = t2.c3
Which gives the expected result but I get the message NOTICE: adding missing FROM-clause entry for table "t3"
How do I get rid of this NOTICE, i.e. how should I construct my select query.
Many thanks
Colin
_______________ _______________ _______________ _______________ _____ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: pmud |
last post by:
In my ASP.Net application I added a required field validator.Before adding
this , my application was running fine but after ading this, when i tried to
view the .aspx in browser, i got an alert msg saying::
Unable to find
script library'/'aspnet_client\system_web\1_1_4322/WebUIValidation.js'. Try
replacing this file manually or reinstall by running 'aspnet_client-regiis'.
I found the file 'WebUIValidation.js' in the location...
|
by: surrealtrauma |
last post by:
the requirement is :
Create a class called Rational (rational.h) for performing arithmetic with
fractions. Write a program to test your class.
Use Integer variables to represent the private data of the class – the
numerator and the denominator. Provide a constructor that enables an
object of this class to be initialized when it is declared. The
constructor should contain default values in case no initializers are
provided and should...
|
by: Mathew Hill |
last post by:
I am a beginner to the more technical aspects of Microsoft Access
(2000) and was wondering if any one can help. I have 3 buttons on a
form which add, delete and search for a record. However, when I click
on the respective buttons absolutely nothing happens! I was wondering
if anyone could help? The code I have is below...
ADDING A RECORD
Private Sub cmdaddstudent_Click()
On Error GoTo Err_cmdaddstudent_Click
|
by: RobMea |
last post by:
I am trying to find a solution to the following problem. First off
I'm new to Access and SQL but have a good back ground in other
languages, thus at a new job this has just been dumped on me so as is
my style I agreed figuring that over time it's just another language
and style anyway to add to the others I've worked in. Heres my
situation.
Have used a make table query to establish a Temp historical archive
table for reporting...
|
by: Wysiwyg |
last post by:
Is there any way to add an embedded resource to a project without copying it
to the project's directory? I have shared resources and don't want each
project using the images, xml files, etc. to need to be updated with the
current copy before being built. I also don't want projects being built with
the old copy.
Thanks!
Bill
| |
by: Robin Thomas |
last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental.
Anyway, quite often I am pulling data from a database, but then I need to
use that data to produce more data. A simple example would be: Let's say
Column1=StartDate and Column2=EndDate. In addition to displaying Column1 and
Column2, I need to do some calculations and display in as Column3.
The calculations are easy and can be done in the code-behind. How to display...
|
by: jim4u |
last post by:
Hi gurus,
I have an automation add-in created using C# for Excel, in which I am
exposing a number of functions. Is there any way I can add help-text
the way excel does for other categories like Financial, Statistical,
etc.
The place I want my help-text to be available is in the
Insert->Function. Here, we can select a category and function. The
corresponding help text is displayed. Now, my automation add-in is
|
by: Steven Smith |
last post by:
Hi,
I'm trying to write a simple program to print invoices for people I do work
for. I've got a form with textboxes for descriptions and amounts for items,
and some code for printing the invoices. It all works except for the one
line that adds all of the item amounts. At run time, a "type mismatch"
error is thrown. I've tried a couple of different things, but the code
won't work. Is there something special about adding currency I'm...
|
by: Gustaf |
last post by:
Here's what happens: I got a Web Service installed locally on my IIS. Then I got a client project, which will call this service. But when I add the Web Reference to the Web Service, and look at the imported classes with Object Browser, there are classes missing. How can that be?
The classes in question are of course public, and I see them in Object Browser in the Web Service project. The classes are auto-generated from an XSD file, using the...
|
by: Jason |
last post by:
Hello,
I am trying to utilitze the AJAX Control toolkit in my asp.net project. I
have added a reference to AjaxControlToolkit.dll, and in my page, added
these lines of code:
<ajaxToolkit:ToolkitScriptManager runat="Server"
EnableScriptGlobalization="true" EnableScriptLocalization="true"
ID="ScriptManager1" />
|
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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: 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...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |