Schwartz ba...@xaprb.com
主题: Re: statistics statement in general log
收件人: mysql@lists.mysql.com
日期: 2010年9月11日,周六,上午1:56
Those are from a 'status' API call. Many ORMs use such calls to check
that the database connection is alive.
On Thu, Sep 9, 2010 at 2:14 AM, raid fifa raid_f...@yahoo.com.cn wrote
Those are from a 'status' API call. Many ORMs use such calls to check
that the database connection is alive.
On Thu, Sep 9, 2010 at 2:14 AM, raid fifa raid_f...@yahoo.com.cn wrote:
Hi guys,
anyone knows what's the meaning of statistics in general log ? thanks.
...
100908 9:40:11 21513
... on t.ProdID-p.ID;
Your join clause subtracts the two IDs, so it's on IDs that differ, and
apparently there aren't any.
PB
-
Victor Subervi wrote:
Hi;
I have the following:
mysql select SKU, Quantity, Name, Price, p.sizes,
p.colorsShadesNumbersShort from tem126080739853 t join
On Mon, Dec 14, 2009 at 12:37 PM, Peter Brawley peter.braw...@earthlink.net
wrote:
... on t.ProdID-p.ID;
Your join clause subtracts the two IDs, so it's on IDs that differ, and
apparently there aren't any.
I beg to differ:
mysql select SKU, Quantity, Name, Price, p.sizes,
Victor Subervi wrote:
On Mon, Dec 14, 2009 at 12:37 PM, Peter Brawley peter.braw...@earthlink.net
wrote:
... on t.ProdID-p.ID;
Your join clause subtracts the two IDs, so it's on IDs that differ, and
apparently there aren't any.
I beg to differ:
...
So why does my select join fail?
Victor,
As far as I can see... change the '-' to '='.
-- fixed query --
SELECT
SKU
, Quantity
, Name
, Price
, p.sizes
, p.colorsShadesNumbersShort
FROM
tem126080739853 t JOIN products p ON
t.ProdID = p.ID
;
-- end --
I
Victor Subervi wrote:
On Mon, Dec 14, 2009 a
mysql select SKU, Quantity, Name, Price, t.sizes,
t.colorsShadesNumbersShort from tem126080739853 t join products p on
t.ProdID-p.ID http://t.prodid-p.id/;
Empty set (0.00 sec)
mysql select ID, SKU, Name, Price from products;
Victor,
I beg to differ:
mysql select SKU, Quantity, Name, Price, p.sizes,
p.colorsShadesNumbersShort from tem126080739853 t join products p on
t.ProdID-p.ID http://t.prodid-p.id/;
...on t.ProdID-p.ID... _subtracts_ the two IDs. To match them use '='
rather than '-'.
PB
-
Victor
On Mon, Dec 14, 2009 at 1:04 PM, Peter Brawley
peter.braw...@earthlink.netwrote:
...on t.ProdID-p.ID... _subtracts_ the two IDs. To match them use '='
rather than '-'.
Thank you for all of you that caught that.
V
Velen schrieb:
Hi,
I need to write up a select statement something like:
Select a.supcode,a.code,b.desc,sum(c.qty),c.dept where
a.supcode=b.supcode and a.code=c.code and a.code=b.code and c.dept
between $tring1 and $tring2. group by supcode
This is fine but the problem is that there is
Velen schrieb:
Hi,
I need to write up a select statement something like:
Select a.supcode,a.code,b.desc,sum(c.qty),c.dept where
a.supcode=b.supcode and a.code=c.code and a.code=b.code and c.dept
between $tring1 and $tring2. group by supcode
This is fine but the problem is that there is
In fact my sql statement is like this:
select b.customer_name Customer,a.sale_id DocNo,a.sale_date Date,a.prod_code
Product,a.quantity Quantity,c.cost_price Cost,a.price Price,
c.prod_description,a.store,d.payMode from sale_trans a,customer_master
b,prod_master c,saletrans_cons d where
Velen,
My problem is that it is displaying a.sale_id but different customer_name
as it is taking sale_id from d and matching cust_code with b
Any non-aggregate SELECTed value that does not have a 1:1 relationship
with your GROUP BY column will show arbitrary results, so the first
thing to get
On Mon, Mar 10, 2008 at 1:38 PM, Peter Brawley
[EMAIL PROTECTED] wrote:
Velen,
My problem is that it is displaying a.sale_id but different customer_name
as it is taking sale_id from d and matching cust_code with b
Any non-aggregate SELECTed value that does not have a 1:1 relationship
Hi,
[EMAIL PROTECTED] schrieb:
Hi,
I have 2 tables as follows:
table 1 contains code,order_qty
table 2 contains code,stock_qty
table 1:
code1, 10
code2, 2
code3, 5
table 2:
code1, 3
code3, 5
code1, 4
code3, 2
I need to see the following result:
code | order_qty| stock_qty
code1 | 10
Hi,
On Jan 18, 2008 2:59 PM, RoryGRen [EMAIL PROTECTED] wrote:
Hi all
I am quite new to mySQL and have the following question I hope someone can
help me with:
I have a database table imported directly from MS Access with two of the
field names having brackets - F(1) and S(1). I don't want
]
Phone: (540) 231-4396
-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 27, 2007 2:53 PM
To: Ed Lazor; Price, Randall
Cc: mysql@lists.mysql.com
Subject: Re: select statement with variable for table_reference?
Yes it is a good idea to store in a table
@lists.mysql.com
Sent: Tuesday, June 26, 2007 11:37 PM
Subject: RE: select statement with variable for table_reference?
Ok, I used your approach like this:
--
select i.scanned_barcode, v.title from inventory as i
left join version as v
Blacksburg, VA 24060
Email: [EMAIL PROTECTED]
Phone: (540) 231-4396
-Original Message-
From: Ed Lazor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 6:02 PM
To: Price, Randall; mysql@lists.mysql.com
Subject: RE: select statement with variable for table_reference?
I'm honestly
unions, you can do
it
in a final where ... that's outside of those params.
Octavian
- Original Message -
From: Ed Lazor [EMAIL PROTECTED]
To: 'Octavian Rasnita' [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Tuesday, June 26, 2007 11:37 PM
Subject: RE: select statement
PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Wednesday, June 27, 2007 8:02 PM
Subject: RE: select statement with variable for table_reference?
Hi Octavian,
First, thanks for helping out. I really appreciate it. Thanks to you
also
Randall.
I am not sure I understand what you want.
If you want
I am using the following method for doing this, but I am sure it is not the
best one:
(select id, title, author, 'book' as type from books)
union
(select id, title, author, 'cd' as type from cds)
union
(select id, title, author, 'dvd' as type from dvds)
where ...
order by ...
limit ...;
the relevant tables... some sort of conditional union. Any
ideas?
-Ed
-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 1:02 PM
To: Ed Lazor; mysql@lists.mysql.com
Subject: Re: select statement with variable for table_reference?
I am using
: RE: select statement with variable for table_reference?
Ok, I used your approach like this:
--
select i.scanned_barcode, v.title from inventory as i
left join version as v on i.record_id = v.id
where
i.database_id = '1
Subject: RE: select statement with variable for table_reference?
Ok, I used your approach like this:
--
select i.scanned_barcode, v.title from inventory as i
left join version as v on i.record_id = v.id
where
i.database_id = '1
Thanks for the info Jerry. =)
-Original Message-
From: Jerry Schwartz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 1:59 PM
To: 'Ed Lazor'; 'Octavian Rasnita'; mysql@lists.mysql.com
Subject: RE: select statement with variable for table_reference?
Getting back to your
PROTECTED]
Phone: (540) 231-4396
-Original Message-
From: Ed Lazor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 4:37 PM
To: 'Octavian Rasnita'; mysql@lists.mysql.com
Subject: RE: select statement with variable for table_reference?
Ok, I used your approach like
Hi Kelly,
Kelly Jones wrote:
In PostgreSQL, the following SELECT statement will return all the
columns for 'tabname':
SELECT x.attname FROM pg_attribute x, pg_class y WHERE
x.attrelid=y.oid AND relname='tabname';
Does MySQL have anything similar?
I know about SHOW COLUMNS FROM tabname, but
I know about SHOW COLUMNS FROM tabname, but am looking for something
more SQL-y, because I want to use the results as part of a larger SQL
statement. For example, I want to find all the tables in a given db
that don't have a column named 'timestamp'.
I thought the 'mysql' system db may have this
You want to use a LEFT JOIN, which will select all the records from A and link them with records in B if there are any. If there are
no matches in B, the the fields from B will be NULL. You then just check for the NULL value (no match) in a B field and use that as
your filter.
SELECT A.*,B.D
I think you want
SELECT * FROM a LEFT JOIN b on a.c = b.d WHERE b.d IS NULL;
The LEFT JOIN means to create a composite record from both tables even if
there is no match on the right-hand table. Checking to see if b.d is null
selects out those composite records that came up empty on the
Aaron Cannon wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all. I hope this is the right place to ask this.
I have two tables, A and B. Each of these tables has a column with
integers. The column in table A is C and the one in B is D.
SELECT c.value FROM c WHERE c.value NOT
I had this problem here and i change my query to:
SELECT f.*, c.id as cat_id, c.position as cat_position, c.state as
cat_state, c.name as cat_name, c.description as cat_desc,
c.image, c.url, m.member_name as mod_name, m.member_id as
mod_id, m.is_group, m.group_id, m.group_name, m.mid
Jason
following statement works in 4 but not 5
SELECT f.*, c.id as cat_id, c.position as cat_position, c.state as
cat_state, c.name as cat_name, c.description as cat_desc,
c.image, c.url, m.member_name as mod_name, m.member_id as
mod_id, m.is_group, m.group_id, m.group_name, m.mid
:59 PM
Subject: RE: PRINT statement?
From Transact-SQL Help file:
PRINT
Returns a user-defined message to the client.
Syntax
PRINT 'any ASCII text' | @local_variable | @@FUNCTION | string_expr
Arguments
'any ASCII text'
Is a string of text.
@local_variable
Is a variable of any valid
Sent: Wednesday, May 10, 2006 11:59 PM
Subject: RE: PRINT statement?
From Transact-SQL Help file:
PRINT
Returns a user-defined message to the client.
Syntax
PRINT 'any ASCII text' | @local_variable | @@FUNCTION | string_expr
Arguments
'any ASCII text'
Is a string of text.
@local_variable
Stephen Cook wrote:
There are such things as extensions to the standard, and many
languages besides BASIC that have the ability to output a character
string. No need to be snippy.
I will look into the --silent option, thanks!
I also tend to use -BN with these kind of scripts:
mysql -u
[EMAIL PROTECTED]
To: Rhino [EMAIL PROTECTED]; Stephen Cook [EMAIL PROTECTED]
Cc: MySQL List mysql@lists.mysql.com
Sent: Wednesday, May 10, 2006 11:59 PM
Subject: RE: PRINT statement?
From Transact-SQL Help file:
PRINT
Returns a user-defined message to the client.
Syntax
PRINT 'any ASCII text
: Wednesday, May 10, 2006 11:59 PM
Subject: RE: PRINT statement?
From Transact-SQL Help file:
PRINT
Returns a user-defined message to the client.
Syntax
PRINT 'any ASCII text' | @local_variable | @@FUNCTION | string_expr
Arguments
'any ASCII text'
Is a string of text.
@local_variable
Is a variable
- Original Message - From: Quentin Bennett
[EMAIL PROTECTED]
To: Rhino [EMAIL PROTECTED]; Stephen Cook [EMAIL PROTECTED]
Cc: MySQL List mysql@lists.mysql.com
Sent: Wednesday, May 10, 2006 11:59 PM
Subject: RE: PRINT statement?
From Transact-SQL Help file:
PRINT
Returns a user-defined message
]; Stephen Cook [EMAIL PROTECTED]
Cc: MySQL List mysql@lists.mysql.com
Sent: Wednesday, May 10, 2006 11:59 PM
Subject: RE: PRINT statement?
From Transact-SQL Help file:
PRINT
Returns a user-defined message to the client.
Syntax
PRINT 'any ASCII text' | @local_variable | @@FUNCTION | string_expr
I've started using the SELECT with no other clauses but I am still
curious about a PRINT-like command. It is for SQL scripts.
Rhino wrote:
- Original Message - From: Stephen Cook [EMAIL PROTECTED]
To: MySQL List mysql@lists.mysql.com
Sent: Sunday, May 07, 2006 3:53 AM
Subject: PRINT
.
--
Rhino
- Original Message -
From: Stephen Cook [EMAIL PROTECTED]
To: Rhino [EMAIL PROTECTED]
Cc: MySQL List mysql@lists.mysql.com
Sent: Wednesday, May 10, 2006 8:09 PM
Subject: Re: PRINT statement?
I've started using the SELECT with no other clauses but I am still curious
about
.
--
Rhino
- Original Message -
From: Stephen Cook [EMAIL PROTECTED]
To: Rhino [EMAIL PROTECTED]
Cc: MySQL List mysql@lists.mysql.com
Sent: Wednesday, May 10, 2006 8:09 PM
Subject: Re: PRINT statement?
I've started using the SELECT with no other clauses but I am still curious
about
- Original Message -
From: Stephen Cook [EMAIL PROTECTED]
To: MySQL List mysql@lists.mysql.com
Sent: Sunday, May 07, 2006 3:53 AM
Subject: PRINT statement?
Is there a statement similar to PRINT in T-SQL (MicroSoft SQL Server)?
It would be handy to debug some scripts.
If you're
Hello.
Please, could you explain what does it mean 'Signal 11 without fail'.
Usually after receiving such a signal MySQL crashes. Of course, it
should do this in normal circumstances. What is in the error log? Check
if the problem still exists on official binaries of 5.0.18.
Ian Sales (DBA)
Gleb Paharenko wrote:
Hello.
Please, could you explain what does it mean 'Signal 11 without fail'.
Usually after receiving such a signal MySQL crashes. Of course, it
should do this in normal circumstances. What is in the error log? Check
if the problem still exists on official binaries of
Hello.
Resolve a stack trace and provide it to the list. See:
http://dev.mysql.com/doc/refman/5.0/en/crashing.html
http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
Now about the replication problem. As I've understood you have
triggers only on the slave. In my opinion, to solve
Gleb Paharenko wrote:
Hello.
Resolve a stack trace and provide it to the list. See:
http://dev.mysql.com/doc/refman/5.0/en/crashing.html
http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
- resolving the stack dump gives me this:-
0x8150650 + 135595600
0xe420 + -7136
.
With best wishes
Ch
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: 14 December 2005 19:22
To: Jesse
Cc: mysql@lists.mysql.com
Subject: Re: SQL Statement Help
Jesse [EMAIL PROTECTED] wrote on 12/14/2005 02:03:22 PM:
Hello,
I need
Hello,
I need help building a SQL Statement. I'm currently using MySQL
5.something. This one is kind of strange, and I can't seem to figure out
how to do it.
I have a table named Participants. Each Participant is allowed to bring up
to 5 Guests. Instead of putting the names in a
Jesse [EMAIL PROTECTED] wrote on 12/14/2005 02:03:22 PM:
Hello,
I need help building a SQL Statement. I'm currently using MySQL
5.something. This one is kind of strange, and I can't seem to figure
out
how to do it.
I have a table named Participants. Each Participant is allowed to
If your MySQL server is a *nix system than table names are case
sensitive.
SELECT A.*,
CASE CounselorOnly
WHEN 1 THEN 'Yes'
WHEN 0 THEN 'No'
END AS CO
FROM Activities A
ORDER BY Activity
I also just noticed, remove the CO = and add AS CO following the END
of
Turn off your auto commit (if using innodb) and run the queries. See how
many rows it updates and compare them. If it matches commit it. Else
rollback.
C.F. Scheidecker Antunes wrote:
Another thing is that table2 might not have a match.
C.F. Scheidecker Antunes wrote:
I actually forgot
C.F. Scheidecker Antunes [EMAIL PROTECTED] wrote on 10/16/2005
01:58:56 PM:
I actually forgot something. I need a two statements into one. The
reason is that table_two has multiple values, so I need the minimal ID
from table 2.Thanks.
Maybe I am working too much here and tired to see the
I am not the smartest on the list, but I think this would do it for you.
UPDATE table_one t1, table_two t2 SET t1.ID = t2.ID WHERE t2.num = t1.num
AND t1.ID = 0
J.R.
-Original Message-
From: C.F. Scheidecker Antunes [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 16, 2005 1:45 PM
To:
I actually forgot something. I need a two statements into one. The
reason is that table_two has multiple values, so I need the minimal ID
from table 2.Thanks.
Maybe I am working too much here and tired to see the right statement.
J.R. Bullington wrote:
I am not the smartest on the list, but
Another thing is that table2 might not have a match.
C.F. Scheidecker Antunes wrote:
I actually forgot something. I need a two statements into one. The
reason is that table_two has multiple values, so I need the minimal ID
from table 2.Thanks.
Maybe I am working too much here and tired to
Jeffrey Santos [EMAIL PROTECTED] wrote on 10/10/2005 01:07:03
PM:
Hey all!
I'm a very novice MYSQL user of the mentality of get it working, then
get
it working the right way, feeling the best way to learn is to just do
it.
I got things working but now I'm looking back and trying to
PM
To: Jeffrey Santos
Cc: mysql@lists.mysql.com
Subject: Re: UPDATE statement optimization
Jeffrey Santos [EMAIL PROTECTED] wrote on 10/10/2005 01:07:03 PM:
Hey all!
I'm a very novice MYSQL user of the mentality of get it working, then get
it working the right way, feeling the best
Subject: Re: UPDATE statement optimization
Jeffrey Santos [EMAIL PROTECTED] wrote on 10/10/2005 01:07:03
PM:
Hey all!
I'm a very novice MYSQL user of the mentality of get it working, then
get
it working the right way, feeling the best way to learn is to just do
it.
I
PM
To: Jeffrey Santos
Cc: mysql@lists.mysql.com
Subject: RE: UPDATE statement optimization
Unless you are on a severely underpowered machine, MySQL will handle 3
million rows without any problems. If you are on such an underpowered
machine, then your current process must absolutely CRAWL
Hello.
Use 4.1.13. Logging for prepared statements works as of that version.
See:
http://bugs.mysql.com/bug.php?id=8367
050822 17:28:13 122 Connect [EMAIL PROTECTED] on test
122 Prepare [1] select product from lth where
On Monday 22 August 2005 09:31, Gleb Paharenko wrote:
Hello.
Use 4.1.13. Logging for prepared statements works as of that version.
See:
http://bugs.mysql.com/bug.php?id=8367
SNIP
Yes, thank you again. I had just upgraded and tested it about the time I got
this message. The loggin is
On Monday 22 August 2005 15:30, Darrell Cormier wrote:
SNIP
Yes, thank you again. I had just upgraded and tested it about the time I
got this message. The loggin is working fine now.
Now I get this for the log output:
/usr/sbin/mysqld-max, Version: 5.0.11-beta-Max-log. started with:
Tcp
Hello.
These links might be helpful:
http://dev.mysql.com/doc/mysql/en/query-log.html
http://dev.mysql.com/doc/mysql/en/debugging-client.html
http://dev.mysql.com/doc/mysql/en/debugging-server.html
Use a fresh version of MySQL, because old couldn't
log queries from
Hello.
I've modified your source code, and it works now. Use diff to see the
changes.
My test table is:
mysql show create table lth\G;
*** 1. row ***
Table: lth
Create Table: CREATE TABLE `lth` (
`product` char(255) default NULL,
On Thursday 18 August 2005 16:37, Gleb Paharenko wrote:
Hello.
These links might be helpful:
http://dev.mysql.com/doc/mysql/en/query-log.html
http://dev.mysql.com/doc/mysql/en/debugging-client.html
http://dev.mysql.com/doc/mysql/en/debugging-server.html
Use a fresh version of
On Thursday 18 August 2005 17:52, Gleb Paharenko wrote:
Hello.
I've modified your source code, and it works now. Use diff to see the
changes.
snip
Thank you, but I made the changes and I still get no returned data. Below is
the contents of the logfile when I run my program. It appears
Sujay Koduri said the following on 08/18/2005 12:31 AM:
Hi,
The problem here is that you have two input bind variables, but you
declaring MysQL BIND array as parm_bind[1], which can hold only one input
bind variable. Make it parm_bind[2]. That should work.
sujay
Thank you for your
Send the code if it is still not working.
sujay
-Original Message-
From: Darrell Cormier [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 18, 2005 7:16 PM
To: mysql_list
Subject: Re: prepared statement problems
Sujay Koduri said the following on 08/18/2005 12:31 AM:
Hi,
The problem
/
Developer: Darrell Cormier
Date : 10-Aug-2005
App Name : msql_conn_env
Purpose : Test MySQL connection using an environment
variable for the connection string.
Sorry, the text of my message did not come through for some reason. I
have included it below.
DC
Sujay Koduri said the following on 08/18/2005 08:48 AM:
Send the code if it is still not working.
sujay
Not sure what you mean by send the code since it is included at the end
of this
Koduri
Subject: Re: prepared statement problems
Sujay Koduri said the following on 08/18/2005 08:48 AM:
Send the code if it is still not working.
sujay
Not sure what you mean by send the code since it is included at the end of
this email. However, I have also attached the file
Sujay Koduri said the following on 08/18/2005 09:33 AM:
hi,
you should use strlen() instead of sizeof() to pass the length of input bind
parameter, otherwise it will read past the actual parameter and tries to
compare with the whole thing which is not intended.
str_length[0]= sizeof(facility);
Hi,
The problem here is that you have two input bind variables, but you
declaring MysQL BIND array as parm_bind[1], which can hold only one input
bind variable. Make it parm_bind[2]. That should work.
sujay
-Original Message-
From: Darrell Cormier [mailto:[EMAIL PROTECTED]
Sent:
On Wednesday, March 30, 2005 09:49, Christopher Vaughan wrote:
I have data in a table listed as
44:22:22
333:33:33
It stands for hhh:mm:ss
If you convert it to a time field you can use mysql built-in functions
to do what you want. You are limited to the range -838:59:59 to
838:59:59
On Wednesday, March 30, 2005 10:24, Christopher Vaughan wrote:
Tom Crimmins on Wednesday, March 30, 2005 at 11:10 AM -0500 wrote:
If you convert it to a time field you can use mysql built-in
functions to do what you want. You are limited to the range
-838:59:59 to 838:59:59 though.
I think I remember a match_at(:) or pat_index(:) UDF which would
return the position of the first : for you, but I can't find it if it
does exist.
On Wed, 30 Mar 2005, Christopher Vaughan wrote:
I have data in a table listed as
44:22:22
333:33:33
It stands for hhh:mm:ss
I want to break each
Christopher Vaughan [EMAIL PROTECTED] wrote on 30/03/2005 16:48:47:
I have data in a table listed as
44:22:22
333:33:33
It stands for hhh:mm:ss
I want to break each part of the data into different parts based on
the ':' to separate them. Then I want to take that data and sum it.
I wrote
Hello.
Use such alter statement:
alter table mytable change a a int default '1';
Every thing works fine on the MySQL 5.0.3 (from the latest bk source):
mysql CREATE TABLE `mytable` (
-
- `a` int(11) NOT NULL,
-
- `b` int(11) NOT NULL,
-
- `c` int(11) default NULL
-
- )
Daniel Kasak wrote:
Homam S.A. wrote:
In the documentation, it doesn't mention which version
of MySQL supports the CASE statement, but it refers to
stored procedures, so is it only supported for 5.x?
I can't get any example of a CASE statement work in
MySQL.
snipped
For example, I can execute
On Wednesday, March 09, 2005 07:49, Philippe Poelvoorde wrote:
Daniel Kasak wrote:
Homam S.A. wrote:
In the documentation, it doesn't mention which version
of MySQL supports the CASE statement, but it refers to
stored procedures, so is it only supported for 5.x?
I can't get any example
Thanks Tom, Daniel, and Philippe for you replies.
Yes, I got the statement working exactly as I wrote
it. I was confused about this documentation:
http://dev.mysql.com/doc/mysql/en/case-statement.html
which states that you need to specify END CASE
instead of just END. So I used the same syntax
At 12:40 -0800 3/9/05, Homam S.A. wrote:
Thanks Tom, Daniel, and Philippe for you replies.
Yes, I got the statement working exactly as I wrote
it. I was confused about this documentation:
http://dev.mysql.com/doc/mysql/en/case-statement.html
which states that you need to specify END CASE
instead
Homam S.A. wrote:
In the documentation, it doesn't mention which version
of MySQL supports the CASE statement, but it refers to
stored procedures, so is it only supported for 5.x?
I can't get any example of a CASE statement work in
MySQL.
snipped
For example, I can execute the following in MS
Craig Hoffman [EMAIL PROTECTED] wrote on 01/18/2005 04:17:30 PM:
Hi There,
I have web form where a user can search certain fields and then have
them displayed aggregated. For example, find all the routes I climbed
with partner A in area(s) ALL (% - wildcard) between date1 and date2 --
so
You don't need an IF only parentheses. This is almost a literal
translation of your exact statement
Select *
from db
where (last_renewal_date between '2004-11-01' and '2004-11-30')
or (last_renweal_date is null
AND signup_date between '2004-11-01' and '2004-11-30'
)
order by
- Original Message -
From: Mike Morton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 01, 2004 2:47 PM
Subject: If statement in a where query
I am trying to find a list of people based on renewal dates, the logic of
the query would be:
Select everything from
Check whether below query helps u ?
Select * from db where IFNULL(last_renewal_date,signup_date) between
'2004-11-01' and '2004-11-30'
Regards
--Yoge
Mike Morton wrote:
I am trying to find a list of people based on renewal dates, the logic of
the query would be:
Select everything from the db
Stuart Felenstein [EMAIL PROTECTED] wrote on 26/11/2004 13:54:31:
I'm trying to build an insert query that will add a
value into a field , after the first insert query adds
the record.
Relevant table information:
+-+-++--+
| RecordID|
Hello.
As said at documentation:
Prepared execution is an efficient way to execute a statement more than once.
Good examples you can find in documentation to MySQL, and in
tests/client_test.c.
Scott Hamm [EMAIL PROTECTED] wrote:
I've read the article about 'prepared statement' found in
Scott,
http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html
regards,
Mark.
On Thu, 2004-11-11 at 15:38, Scott Hamm wrote:
I've read the article about 'prepared statement' found in MySQL 4.1, and am
not sure if I understood what 'prepared statement' does and how can it
*THAT* one was what I already ready and could not understand it since
English isn't my first language.
-Original Message-
From: Mark Maunder [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 11, 2004 12:45 PM
To: Scott Hamm
Cc: 'Mysql ' (E-mail)
Subject: Re: Prepared statement for MySQL
Scott,
I've read the article about 'prepared statement' found in MySQL 4.1, and am
not sure if I understood what 'prepared statement' does and how can it
benefit us. Can anyone elaborate on what 'prepared statement' could do with
examples where possible?
In the simplest case, consider this:
: [EMAIL PROTECTED]
Web: http://www.alchemetrics.co.uk
-Original Message-
From: Fagyal Csongor [mailto:[EMAIL PROTECTED]
Sent: 11 November 2004 18:10
To: 'Mysql ' (E-mail)
Subject: Re: Prepared statement for MySQL 4.1
Scott,
I've read the article about 'prepared statement' found
How about
SELECT * FROM queLog
WHERE accessed = Y
AND targetApp = acadreg
AND enteredQue = '2004-11-09 18:00:00';
(You said greater than first, then you said greater than or equal to. I
went with the latter.)
Michael
Kory Wheatley wrote:
I'm trying to do a select statement where:
field
Are you trying to accomplish this in a program, a script or from the command
line?
If you are using a program, what language are you using? If you are using a
script, what platform and shell are you using? (For example, Linux with the
bash shell or Windows.)
If you are using the command line,
I don't know why you want to do this, but looking at your sybtax, it
seems like you come
from a Sybase or SQL Server environment. What you are trying to achieve
is the
way it is done in Transact SQL, where the conditional statements and
stuff like that which
are typically used in stored
Hi Anders,
Thanks for that. Yes, I have come from an MSSQL environment, and I'm
using .Net 1.1 with the MySQL Connector/Net. The idea behind using
conditional statements was to assign a query to a business task. For
example, I could write a query to handle adding items to a shopping
cart. In the
1 - 100 of 216 matches
Mail list logo