Thanks! Worked perfectly. And also thanks to the other people who
responded. Being unfamiliar with how MySQL seems to handle time your
responses really helped!
-Chris
On Jun 27, 2005, at 1:16 PM, [EMAIL PROTECTED] wrote:
That would have worked if TIME values weren't converted to numbers
[EMAIL PROTECTED] wrote:
Christopher Molnar <[EMAIL PROTECTED]> wrote on 06/27/2005
12:55:08 PM:
What I would like to use is:
select ctype, count(tsid), sum(amount), sum(amount_collected), sum
(camount), sum(commision), sum(subtime(time_out,dispatch_time)) as
time from time_sheet where t
Christopher Molnar <[EMAIL PROTECTED]> wrote on 06/27/2005
12:55:08 PM:
> I have a table that has the following structure:
> mysql> describe time_sheet;
> +--+---+--+-+
> ++
> | Field| Type | Null | Key | Defaul
I have a table that has the following structure:
mysql> describe time_sheet;
+--+---+--+-+
++
| Field| Type | Null | Key | Default|
Extra |
+--+---+--+-+---
10
sam 7 2
ben 1
I did this with 2 temporary tables. one of selects
true total count , other selects false total counts
then I JOINed them with UNION
Can I
1
I did this with 2 temporary tables. one of selects
true total count , other selects false total counts
then I JOINed them with UNION
Can I do this in one select sql?
__
Do you Yahoo
1 0
I did this with 2 temporary tables. one of selects
true total count , other selects false total counts
then I JOINed them with UNION
Can I do this in one select sql?
__
Do you Yahoo
>
>
> Extranet
> [EMAIL PROTECTED] - 06/02/2003 02:31
>
> To:mysql
>
> cc:
>
>
> Subject:Can mysql execute this ? how can i do
> this ?
>
>
> Is this possible
>
> "select nome from categorias where id_categoria in
>
Sadly MySQL does not support sub-selects yet. Take a look at the manual for
suggestions of ways around it.
Keith
Extranet
[EMAIL PROTECTED] - 06/02/2003 02:31
To:mysql
cc:
Subject:Can mysql execute this ? how can i do this ?
Is this possible
"select nome from categorias
If you have id_categoria in both tables why don't you use join?
Try this:
select nome from categorias inner join categoriamembro
on categorias.id_categoria=categoriamembro.id_categoria
where id_membro=1807
[]s
Anderson Pereira Ataides
Em Qui 06 Fev 2003 00:31, you wrote:
> Is this possible
>
> "
Narciso,
NMR> "select nome from categorias where id_categoria in (select id_categoria
NMR> from categoriamembro where id_membro=1807)"
MySQL supports subselects starting with version 4.1. AFAIK there are
no binary distributions available for 4.1, so you either have to
compile it yourself or wait
Is this possible
"select nome from categorias where id_categoria in (select id_categoria
from categoriamembro where id_membro=1807)"
in MySQL
Thks
[MsR]
-
Before posting, please check:
http://www.mysql.com/manual.php (
Hi Andreas,
> I'm just getting started with mysql so please bear with me. =8-}
> I do a 3 table query like:
> SELECT a.x, b.y, c.z
> FROM a, b, c
> WHERE a.b_fk = b.id AND a.c_fk = c.id;
> That works so far.
> In c can be rows which aren't active anymore.
> There is a good_from and a good_until
Hi
I'm just getting started with mysql so please bear with me. =8-}
I do a 3 table query like:
SELECT a.x, b.y, c.z
FROM a, b, c
WHERE a.b_fk = b.id AND a.c_fk = c.id;
That works so far.
In c can be rows which aren't active anymore.
There is a good_from and a good_until DATETIME field which
You have written the following:
[snip]
> I have a file(transfile) that has 2 fields(cust# and item#)
>
> CUST# ITEM#
> 1 '12a'
> 1 '13a'
> 2 '12a'
> 3 '13a'
> 4 '15a'
>
> If I want to select customers tha
: "Smith, Mike" <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: RE: How can I do this SQL query
> Date: Thu, 23 May 2002 15:33:05 -0400
>
> How can I do this SQL query
>
> I have a file(transfile) that has
; If I want to select customers that have ordered item '12a' but not '13a'
> How can I do this?
>
> I want to end up with a result of only customer 2 in this case.
Maybe something like this:
SELECT cust
FROM
transfile AS t1
LEFT JOIN transfile AS t2 ON
How can I do this SQL query
I have a file(transfile) that has 2 fields(cust# and item#)
CUST# ITEM#
1 '12a'
1 '13a'
2 '12a'
3 '13a'
4 '15a'
If I want to sel
Hi,
> i actually need the id's with no row returned as if they
> were there (but with default values)... they do not need
> to be inserted into the table, just returned as if they
> were in there.
The only way I can think of would be to create a table with
all the values (ids) you ne
counter.number = your_table.id
order by your_table.id
TK
> -Opprinnelig melding-
> Fra: Jamie Burns [mailto:[EMAIL PROTECTED]]
> Sendt: 27. november 2001 14:28
> Til: sherzodR
> Kopi: [EMAIL PROTECTED]
> Emne: Re: can i do this with sql?
>
>
> i actually need the id
ion.co.uk> cc: <[EMAIL PROTECTED]>
Subject: Re: can i do this
with sql?
ns" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 1:24 PM
Subject: Re: can i do this with sql?
>
>
> i belive you want..:
>
> SELECT * FROM your_table WHERE id < 9 ORDER BY id LIMIT 9;
>
> But when it comes to generating missing
i belive you want..:
SELECT * FROM your_table WHERE id < 9 ORDER BY id LIMIT 9;
But when it comes to generating missing items... I'm not sure if
i got you right though, but they should exist. MySQL cannot
make the rows that do not exist
Jamie Burns wrote:
: Hi all,
:
: I have a table like
Hi all,
I have a table like this:
iddatayear
1 201
2 201
6 201
7 201
8 201
11201
What i want to be able to get is these results from an sql query (given that
i want id's 1-9):
Hi Carlos,
>SELECT * FROM some_table WHERE field1 = 1 AND field2 > 0
>ORDER BY CONCAT(field1,field2) LIMIT 1
You have to give the concatenated field an alias name and use it in the
SELECT-subpart of your query, e.g.
SELECT field1, field2, concat(field1,field2) AS sortvar1 WHERE field1=1 AND
fi
[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 24, 2001 9:53 AM
Subject: Can I do this ?
> I'm using C API to access MySQL from another database in order to re-use
>
> a lot of existing software. Due the way the old database works I need
>
> a query be
I think that you can not concat and ORDER BY? (or ORDER by a function).
Hope this help
Simon
-Original Message-
From: Carlos Savoretti [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 15:53
To: [EMAIL PROTECTED]
Subject: Can I do this ?
I'm using C API to access MySQL from another dat
I'm using C API to access MySQL from another database in order to re-use
a lot of existing software. Due the way the old database works I need
a query be done like this:
SELECT * FROM some_table WHERE field1 = 1 AND field2 > 0
ORDER BY CONCAT(field1,field2) LIMIT 1
This is for not to create
Hi,
I have four table that have common fields like: date, destinazione and
price.
I what to create a temporary table with all four fields from four tables,
what would be the correct sql syntax.
TIA
Adrian
-
Be
1.parentid
> WHERE ((families.parentid)=0);
>
> > -Original Message-
> > From: Johannes Pretorius [SMTP:[EMAIL PROTECTED]]
> > Sent: 01 February 2001 15:13
> > To: MySQL
> > Subject: Re: How can I do this ???
> >
> >
> > Yes that is
P:[EMAIL PROTECTED]]
> > Sent: 01 February 2001 15:13
> > To: MySQL
> > Subject:Re: How can I do this ???
> >
> >
> > Yes that is true but what I want to get at is. Like I want to get
> > all Childs of the Parents. But NOT the Parents. Meaning if
; From: Johannes Pretorius [SMTP:[EMAIL PROTECTED]]
> Sent: 01 February 2001 15:13
> To: MySQL
> Subject: Re: How can I do this ???
>
>
> Yes that is true but what I want to get at is. Like I want to get
> all Childs of the Parents. But NOT the Parents. Meaning if the
&g
OBJID = 1
>
> :)
>
> - Original Message -
> From: Johannes Pretorius <[EMAIL PROTECTED]>
> To: MySQL <[EMAIL PROTECTED]>
> Sent: Thursday, February 01, 2001 4:43 PM
> Subject: How can I do this ???
>
> > Hi there
> > 0---0
> > Sorry for stupid Q
&g
According to your question it could be done as simple as
select * from People where PARENT_ID = 1 or OBJID = 1
:)
- Original Message -
From: Johannes Pretorius <[EMAIL PROTECTED]>
To: MySQL <[EMAIL PROTECTED]>
Sent: Thursday, February 01, 2001 4:43 PM
Subject: How c
Hi there
0---0
Sorry for stupid Q
but I have the following Table named People
OBJID -> int(11) not null auto_increment
NAME -> varchar(25)
PARENT_ID -> int(11)
Now if my data is as follows
OBJID | NAME | PARENT_ID
---
1
PROTECTED]]
Sent: Thursday, January 25, 2001 2:55 PM
To: [EMAIL PROTECTED]
Subject: Can I do this in a SELECT
I have a need for a SELECT query...
I don't really want any of the data from the select...
Rather I need the size of the data
basically I need
SELECT sum(length(*)) FROM MyDB WHERE
I have a need for a SELECT query...
I don't really want any of the data from the select...
Rather I need the size of the data
basically I need
SELECT sum(length(*)) FROM MyDB WHERE MyDB.Something LIKE 'this%'
-
Before posting
37 matches
Mail list logo