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,
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.
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
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
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
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
>
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
: 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
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
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.
Hi,
I have the following tables:
mysql> describe lawfac_pub;
++--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
++--+--+-+-+---+
| hawkid | varchar(16) | | PRI | |
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
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
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_
* 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
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
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
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
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
---+
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
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
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
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:
>
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
- 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
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
26 matches
Mail list logo