Re: Help with join in query

2005-05-16 Thread mfatene
with no comma (sorry): select sum(a.attendhours), s.attendhours from attendance a, attsum s where a.siteid = s.siteid and a.assignmentid = s.assignmentid and a.attenddate = s.attenddate and a.siteid = 'XXX' and a.attenddate >= '-XX-XX' group by a.assignmentid,

Re: Help with join in query

2005-05-16 Thread mfatene
hi, you can add ... ... group by a.assignmentid, a.attenddate; having sum(a.attendhours) != s.attendhours Mathias Selon Scott Pippin <[EMAIL PROTECTED]>: > I have the following query. > > select > sum(a.attendhours), > s.attendhours > from > attendance a, > attsum s > where > a.

Help with join in query

2005-05-16 Thread Scott Pippin
I have the following query. select sum(a.attendhours), s.attendhours from attendance a, attsum s where a.siteid = s.siteid and a.assignmentid = s.assignmentid and a.attenddate = s.attenddate and a.siteid = 'XXX' and a.attenddate >= '-XX-XX' group by a.assignmentid, a.att

Re: Please help with join issue

2004-03-05 Thread Egor Egorov
Erica L Ridley <[EMAIL PROTECTED]> wrote: > I need help with rewriting a sql query. Nested queries that work in MS > databases apparently do not work in MySQL databases. Here is what I need > in MS query pseudo code: > > SELECT table1.myfield1, table2.myfield2 > FROM table1, table2 > WHERE ta

Please help with join issue

2004-03-05 Thread Erica L Ridley
I need help with rewriting a sql query. Nested queries that work in MS databases apparently do not work in MySQL databases. Here is what I need in MS query pseudo code: SELECT table1.myfield1, table2.myfield2 FROM table1, table2 WHERE table1.key=table2.key AND myfield1="something" AND myfiel

RE: RESOLVED - Help with "JOIN" and Record Display

2003-12-14 Thread Hunter, Jess
Original Message- > From: Hunter, Jess [SMTP:[EMAIL PROTECTED] > Sent: Sunday, December 14, 2003 11:34 AM > To: [EMAIL PROTECTED] > Subject: Help with "JOIN" and Record Display > > This being the first time I have tried to do a JOIN statement (and still >

Help with "JOIN" and Record Display

2003-12-14 Thread Hunter, Jess
This being the first time I have tried to do a JOIN statement (and still not yet fully understanding it). If someone could take a look at the below code and see what I may be doing wrong. I have the actual code working and it displays the information from $TableName2.notes, however in this table t

RE: help with join syntax

2003-03-04 Thread Roger Davis
: Tuesday, March 04, 2003 4:58 PM To: Bob Ramsey Cc: [EMAIL PROTECTED] Subject: Re: help with join syntax Hi. This is not at all an answer to your problem, and perhaps you're already aware of my tip: I usually use phpMyAdmin and paste my SQL statements in there to see what is causing the

Re: help with join syntax

2003-03-04 Thread Bob Ramsey
At 03:57 PM 3/4/2003, Martin Ostlund wrote: I usually use phpMyAdmin Thanks for the tip. Unfortunately it isn't my server and they haven't finished installing phpMyAdmin on it yet. That's why I usually make odbc connections in access and build the queries graphically. But it just keeps cho

Re: help with join syntax

2003-03-04 Thread Martin Ostlund
Hi. This is not at all an answer to your problem, and perhaps you're already aware of my tip: I usually use phpMyAdmin and paste my SQL statements in there to see what is causing the error, and when it works you get a pretty good picture of how your "virtual" table looks like. Just my 2 cents.

help with join syntax

2003-03-04 Thread Bob Ramsey
Hi, I have the following tables: mysql> describe lawfac_pub; ++--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-+---+ | hawkid | varchar(16) | | PRI | |

Re: Need help with JOIN

2003-02-10 Thread keith . jones
D] To:mysql cc: Subject:Need help with JOIN Heyho folks, I am sitting now for a few weeks on a tricky problem. I don't get it - maybe anyone of you could give me a hint. Let's say I have two tables : Table One has a lot of information about travels, hotels, flights etc. Table

Need help with JOIN

2003-02-10 Thread Lars Jankowfsky
Heyho folks, I am sitting now for a few weeks on a tricky problem. I don't get it - maybe anyone of you could give me a hint. Let's say I have two tables : Table One has a lot of information about travels, hotels, flights etc. Table Two has an entry for each hotel and each day where I store info

Help with JOIN, please!

2002-11-03 Thread Ken Chiba
Hi, I'm having some real problems figuring out a seemingly simple join statement. I've looked through some of the mailing list posts, but I can't seem to find what I'm looking for. Here's what I have - 2 tables: table1 (id, stimulus_number, stimulus_type) table 2 (id, stimulus_number, stimulus_

Re: Help with join...

2002-06-27 Thread Roger Baklund
* Peter Engström > I have an table called 'list' where I store all items for the pulldown > menues on my site. > > Table list has three columns > - id (int autoincrement) > - pulldown_name (tinytext - name of pulldown) > - item (tinytext - the item for the pulldown menu) > > A table called clie

Help with join...

2002-06-26 Thread Peter Engström
Hi! I have an table called 'list' where I store all items for the pulldown menues on my site. Table list has three columns - id (int autoincrement) - pulldown_name (tinytext - name of pulldown) - item (tinytext - the item for the pulldown menu) A table called client_index stor all the info a

Re: Need Help with JOIN

2002-06-13 Thread Mike
Thanks for the help. Got that to work no problem. Mike - Original Message - From: "Harrison C. Fisk" <[EMAIL PROTECTED]> To: "Mike" <[EMAIL PROTECTED]> Cc: "mysql list" <[EMAIL PROTECTED]> Sent: Thursday, June 13, 2002 5:48 PM Subject: Re

Re: Need Help with JOIN

2002-06-13 Thread Harrison C. Fisk
Mike, With the way you have it written below, all of the pic1_id, pic2_id, pic3_id, and pic4_id must be equal (because they all equal pic.pic_id). Since this wasn't true for any of the rows, that is why you were getting no results. To get each picture value seperately, you will have to do on

Need Help with JOIN

2002-06-13 Thread Mike
Hello, I have 2 tables(pics and outings) pics pic_id, tinyint path, varchar outings outings_id, tinyint pic1_id, tinyint pic2_id, tinyint pic3_id, tinyint pic4_id, tinyint When i try to do a join like this mysql_query("SELECT * FROM pics inner join outings on outings.pic1_id=pic.pic_id and ou

Fw: Help with JOIN query

2002-03-29 Thread Bill Easton
---+ 5 rows in set (0.00 sec) mysql> > From: "Jeff Habermann" <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Help with JOIN query > Date: Thu, 28 Mar 2002 17:16:05 -0800 > > What i want to do seems simple, but i can not for the life of me figure out

Re: Help with JOIN query

2002-03-29 Thread DL Neil
Jeff, > What i want to do seems simple, but i can not for the life of me figure out > how to do it. > Tables: These tables are not related in any way. > > A > -- > 1 > 2 > 3 > 4 > 5 > > B > -- > 1,Bob > 3,Jack > 7,Janet > 8,Gary > 9,Kelly > > I would like to combine tables A and B with a SELECT

Help with JOIN query

2002-03-28 Thread Jeff Habermann
What i want to do seems simple, but i can not for the life of me figure out how to do it. Tables: These tables are not related in any way. A -- 1 2 3 4 5 B -- 1,Bob 3,Jack 7,Janet 8,Gary 9,Kelly I would like to combine tables A and B with a SELECT statement to get this: SELECT -- 1,1,Bob

Re: Help with Join

2002-02-26 Thread Anvar Hussain K.M.
Hi David, Does this work for you? select customer.custcode, bookings.cust from customer left join bookings on customer.custcode=bookings.cust group by (customer.custcode) having max(ifnull(bookings.stdt,'-00-00') <= '2002-02-16'; Regards, Anvar. At 09:06 PM 26/02/2002 +, you wrote: >

Help with Join

2002-02-26 Thread David Shields
It's late, and I'm being dumb, so can anyone help ? I know that select customer.custcode, bookings.cust from customer left join bookings on customer.custcode=bookings.cust where bookings.cust is null; will show me all customers with no corresponding entry in bookings table. But I want to know

Re: Help with join

2001-12-21 Thread Kittiphum Worachat
- Original Message - From: "John Mayson" <[EMAIL PROTECTED]> To: "MySQL List" <[EMAIL PROTECTED]> Sent: Saturday, December 22, 2001 10:11 AM Subject: Help with join > I'm still in the learning mode with mySQL. > > I have two tables (fr

Help with join

2001-12-21 Thread John Mayson
I'm still in the learning mode with mySQL. I have two tables (frequencies and agencies), both contain a column called "uid". I wish to join these two tables. When I run this... USE radio; SELECT f.freq1, f.ctcss1, f.callsign, a.agency FROMfrequencies as f JOINagencies as a ON f.uid