Sorry, I have missed information in my earlir question, that I have added below.
> Joppe A wrote:
>
> Hello all, Please help a newbie ;-) Have a little problem with to
> make a sql-query as I want to have it... The problem is I need to
> check in 3 tables and count out and get it presentated per
> Now, to complicate things further, suppose there is
> yet another table (grandparent, let's say) and there is
> a column in parent that is grandparent_id. I only want
> results where parent.grandparent_id = 'Fred'. How do
> I do that? Is it with a WHERE clause or some other
> SQL magic?
>
> Dean
Dean A. Hoover wrote:
Now, to complicate things further, suppose there is
yet another table (grandparent, let's say) and there is
a column in parent that is grandparent_id. I only want
results where parent.grandparent_id = 'Fred'. How do
I do that? Is it with a WHERE clause or some other
SQL magic?
Now, to complicate things further, suppose there is
yet another table (grandparent, let's say) and there is
a column in parent that is grandparent_id. I only want
results where parent.grandparent_id = 'Fred'. How do
I do that? Is it with a WHERE clause or some other
SQL magic?
Dean
Daniel Kasak wro
Jim Grill wrote:
Suppose I have two tables: parent and
child. I want to create an SQL statement
that will get the count of all children
belonging to parent. Is this possible in
one statement? The one I have works
if parent has children, but not if the
number of children is 0. Here's what
I have:
SE
> Suppose I have two tables: parent and
> child. I want to create an SQL statement
> that will get the count of all children
> belonging to parent. Is this possible in
> one statement? The one I have works
> if parent has children, but not if the
> number of children is 0. Here's what
> I have:
>
>
Dean A. Hoover wrote:
Suppose I have two tables: parent and
child. I want to create an SQL statement
that will get the count of all children
belonging to parent. Is this possible in
one statement? The one I have works
if parent has children, but not if the
number of children is 0. Here's what
I hav
I have a home page where I need to show three news articles which are
specified by the administrator - so it might not be the latest articles
and they might not be in any order. I have designed the db to have two
tables to fulfill this function the first table 'tbl_press' holds the
news articles,
Matthew Stuart wrote:
I have a home page where I need to show three news articles which are
specified by the administrator - so it might not be the latest
articles and they might not be in any order. I have designed the db to
have two tables to fulfill this function the first table 'tbl_press'
Thanks to You Brent and Bill Easton
and Sorry
Hrmm , that what happen when not clipping direct into mail program ,
here is the Original :-) :
Select A.DepartmentName,A.Address,P.Postcode,P.cityname,CP.firstname
from caddress A,cpostinfo P
left Join CContactPerson CP , caddresscontactperson C
Your syntax is wrong, or at least not standard, if you are trying to do
multiple left joins.
Your ordering is not your typical for a query.
And you say "there" instead of "where".
Your query should be structure like this:
SELECT
FROM , ,...
LEFT JOIN ON
LEFT JOIN ON
LEFT JOIN ON
...
WHERE
On Wednesday, Oct 23, 2002, at 00:13 America/Phoenix, Mylin Campos
wrote:
Hi all,
I just wanted to know if you guys can help me out with this error.
It's actually an sql and jdbc error.
I have a class called employeeDBUtil. In this class, it has a method
called updateEmployee. I wanted to
It looks like you're missing a comma in your SQL statement in between
placeOfBirth and civilStatus.
Good Luck!
Dennis
- Original Message -
From: "Mylin Campos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 23, 2002 2:13 AM
Subject: sql problem
>
> Hi all,
>
> I j
Dear Vincent,
> I have 2 numeric column a,b in my table.
> I want to retrieve rows which a in range
> x~y, but b not in this range. So I wrote
> a SQL statement
>
> select * from where
> ( a > x and a < y ) and ( b < x or b > y )
>
> But wrong result returned with this
> statement. Is this SQL w
G'day all,
For some reason I am receiving messages from the MySQL list (only) which I
have already received - some more the a week ago. Is anyone else getting
repeat posts?
kim
-
Before posting, please check:
http://www.mys
Hi.
This is dicussed here:
http://www.mysql.com/doc/G/r/Group_by_functions.html
(after the function list)
http://www.mysql.com/doc/E/x/Examples.html (see the subsections)
Bye,
Benjamin.
On Sat, Nov 24, 2001 at 11:01:26PM +0530, [EMAIL PROTECTED] wrote:
> Hello Everyone,
>
> I wants
SELECT (t1.cnt1 + t2.cnt3 - t3.cnt11) FROM table
t1, table t2, table t3 WHERE t1.ColPoint=1 AND
t2.ColPoint=5 AND t3.ColPoint=2 AND t1.id=1 AND
t2.id=t1.id AND t3.id=t1.id
Of course, self joins can be expensive, this grows
in complexity as you need to add/subtract more
counts ,and this is not ge
>I have a problem adapting a multiple select to MySQL.
>Can someone help me ?
>
>Here is my request (Oracle format)
>
>SELECT Tactic.teamCode FROM Tactic WHERE
>Tactic.teamCode NOT IN (SELECT Game.teamCode1 FROM Game, Turn WHERE
>Game.gameTurn = Turn.code)
>AND Tactic.teamCode NOT IN (SELECT Game.
In fact this does not return me what I want :
If I have the tables
Tactic
teamCode 1
teamCode 2
teamCode 3
teamCode 4
Game
teamCode1 1 teamCode2 3 GameTurn 1
teamCode4 1 teamCode2 3 GameTurn 1
Turn
Code 1
My request would return me nothing
while your request would return me
different sets wit
On Mon, 28 May 2001, Lefebvre, Cedric wrote:
>
> I have a problem adapting a multiple select to MySQL.
> Can someone help me ?
>
> Here is my request (Oracle format)
>
> SELECT Tactic.teamCode FROM Tactic WHERE
> Tactic.teamCode NOT IN (SELECT Game.teamCode1 FROM Game, Turn WHERE
> Game.gameTu
Something like
SELECT Tactic.teamCode
FROM Tactic t, Game g, Turn r
WHERE t.teamCode <> g.teamCode1
AND t.teamCode <> g.teamCode2
AND g.gameTurn = r.code;
...and even the table "Turn" may not be necessary, depending on the values
in your tables and what you want to do with it.
- Original M
AFAIK MySQL does not yet support sub-selects.
--zak
- Original Message -
From: "Lefebvre, Cedric" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 28, 2001 12:41 AM
Subject: SQL Problem
> I have a problem adapting a multiple select to MySQL.
> Can someone help me ?
>
> Her
That feature is only available in 3.23, while you're running
3.22. Upgrade your server and you'll get it.
--
"There cannot be a crisis today. My schedule is already full."
--Henry Kissinger
> -Original Message-
> From: lrado [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 2
23 matches
Mail list logo