Re: SQL problem

2005-02-23 Thread Joppe A
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

Re: sql problem

2004-09-08 Thread Jim Grill
> 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

Re: sql problem

2004-09-08 Thread Daniel Kasak
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?

Re: sql problem

2004-09-08 Thread Dean A. Hoover
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

Re: sql problem

2004-09-08 Thread Daniel Kasak
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

Re: sql problem

2004-09-08 Thread Jim Grill
> 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: > >

Re: sql problem

2004-09-08 Thread Daniel Kasak
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

Re: SQL problem

2004-05-06 Thread SGreen
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,

Re: SQL problem

2004-05-06 Thread gerald_clark
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'

Re: Sql - Problem with Left Join

2003-11-13 Thread Kim G. Pedersen
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

Re: Sql - Problem with Left Join

2003-11-13 Thread Brent Baisley
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

Re: sql problem

2002-10-23 Thread Clayburn W. Juniel, III
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

Re: sql problem

2002-10-23 Thread Dennis Salguero
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

Re: SQL problem?

2002-02-24 Thread DL Neil
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

Re: SQL-Problem with three tables and joins

2002-02-13 Thread Kim Kohen
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

Re: SQL Problem

2001-11-27 Thread Benjamin Pflugmann
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

Re: SQL Problem

2001-08-29 Thread Adams, Bill TQO
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

Re: SQL Problem

2001-05-28 Thread Bob Hall
>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.

RE: SQL Problem

2001-05-28 Thread Lefebvre, Cedric
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

Re: SQL Problem

2001-05-28 Thread oltra jean-michel
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

Re: SQL Problem

2001-05-27 Thread Rolf Hopkins
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

Re: SQL Problem

2001-05-27 Thread Zak Greant
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

RE: sql problem - it may be a version problem ??

2001-01-24 Thread The Tilghman
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