Bob,
There's some discussion of it at
http://dev.mysql.com/doc/refman/5.0/en/rewriting-subqueries.html.
PB
-
Bob Gailer wrote:
Michael Stassen wrote:
Bob Gailer wrote:
Peter Brawley wrote:
Grant,
>If I want to select all the products that are in the
product_table, >but
Michael Stassen wrote:
Bob Gailer wrote:
Peter Brawley wrote:
Grant,
>If I want to select all the products that are in the product_table,
>but not in the sale_table, how to make the query? The
product_table >has all the products, but the sale table is a subset
of the prod
Thanks,
This worked exactly like I had hoped.
Grant
Peter Brawley <[EMAIL PROTECTED]> wrote:Grant,
>If I want to select all the products that are in the product_table,
>but not in the sale_table, how to make the query? The product_table
>has all the products, but
);
These two queries are logically equivalent. Both work. The first will
usually be faster.
PB
Bob Gailer wrote:
Peter Brawley wrote:
Grant,
>If I want to select all the products that are in the product_table,
>but not in the sale_table, how to make the query? The product_table
>
Bob Gailer wrote:
Peter Brawley wrote:
Grant,
>If I want to select all the products that are in the product_table,
>but not in the sale_table, how to make the query? The product_table
>has all the products, but the sale table is a subset of the
product_table.
SELECT * FROM prod
Peter Brawley wrote:
Grant,
>If I want to select all the products that are in the product_table,
>but not in the sale_table, how to make the query? The product_table
>has all the products, but the sale table is a subset of the product_table.
SELECT * FROM product_table p
Grant,
>If I want to select all the products that are in the product_table,
>but not in the sale_table, how to make the query? The product_table
>has all the products, but the sale table is a subset of the product_table.
SELECT * FROM product_table p
LEFT JOIN sale_table s USING
Hi,
I have 2 tables like:
product_table:
prod_id
item_name
price
data
data
etc
sale_table:
prod_id
sale_price
If I want to select all the products that are in the product_table, but not in
the sale_table, how to make the query? The product_table has all the products,
but the sale table is
concurrency for inserts into a table
containing an AUTO_INCREMENT column. Two transactions cannot have the
AUTO-INC lock on the same table simultaneously.
What happened if it exist?... Any idea?
---TRANSACTION 0 461360628, ACTIVE 19 sec, process no 734, OS thread id
3136353728 setting auto-inc lock
I appreciate the suggestion, but I'm not looking to drop anything. I
only want it as a safety net in the event that the table doesn't
already exist. I'm doing syncing of sorts, and I want the CREATE
TABLE IF NOT EXISTS so as not to throw errors in the event that the
table
DROP TABLE IF NOT EXISTS?
On 1/16/06, Michael Williams <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> Having a bit of mysqldump trouble again. I've looked over the
> documentation (again) and can't seem to find the flag to make
> 'mysqldump' out pu
Hi All,
Having a bit of mysqldump trouble again. I've looked over the
documentation (again) and can't seem to find the flag to make
'mysqldump' out put "CREATE TABLE IF NOT EXISTS". Any ideas?
Regards,
Michael
--
MySQL General Mailing List
For list ar
InnoDB does purge deleted rows from the ibdata files. Certain
PostgreSQL advocates have been spreading a claim that InnoDB would not
do that, but the claim is false.
If your ibdata file keeps growing indefinitely, please check with SHOW
INNODB STATUS that you do commit all your transactions
Heikki Tuuri wrote:
Carl,
InnoDB does purge deleted rows from the ibdata files. Certain
PostgreSQL advocates have been spreading a claim that InnoDB would not
do that, but the claim is false.
Could You explain more about reusing space previously taken by deleted
rows? Is this concept simil
Carl,
InnoDB does purge deleted rows from the ibdata files. Certain PostgreSQL
advocates have been spreading a claim that InnoDB would not do that, but the
claim is false.
If your ibdata file keeps growing indefinitely, please check with SHOW
INNODB STATUS that you do commit all your
HI Carl,
The ibdata file growth can be stopped by removing the autoextend
keyword in the my.cnf file.
In your my.cnf file the entry might be
innodb_data_file_path = ibdata1:256M:autoextend
If you want to stop the growth of that file and add another file then this
is what you want
g that you would use in the my.cnf file to set things up).
You'll have to find out the size in MB of your current file (ls -lh)
when you do this (if you want to start a new innodb data file on a
separate disk, etc.), since in my experience MySQL will complain if you
specify the size of the f
r as long
as we have that InnoDB database. Am I correct? I'm no MySQL
guru, my parsing of TFM and googling around and finding bug and feature
requests for ibdata1 purging suggests that this is the case.
If so, if I drop the InnoDB database, stop mysqld, delete (UNIX
filesystem) the imdata1
ject: update or insert if necessary?
>
> I have a situation where I need to update a record for a
> given key in a MySQL table, but insert a record if the key
> doesn't exist. I could do this by doing a SELECT on the key,
> then doing an UPDATE if anything comes back, or a
Actually, you may be more interested in:
INSERT . ON DUPLICATE KEY UPDATE
- Original Message -
From: "steve" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, December 28, 2005 6:57 AM
Subject: update or insert if necessary?
I have a situation where I need to update a record
http://dev.mysql.com/doc/refman/5.0/en/replace.html
- Original Message -
From: "steve" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, December 28, 2005 6:57 AM
Subject: update or insert if necessary?
I have a situation where I need to update a record for a given key in a
I have a situation where I need to update a record for a given key in a MySQL
table, but insert a record if the key doesn't exist. I could do this by doing
a SELECT on the key, then doing an UPDATE if anything comes back, or and INSERT
otherwise. This seems rather clunky though, an
-
From: Subscriptions [mailto:[EMAIL PROTECTED]
Sent: Monday, 12 December 2005 3:01 AM
To: mysql@lists.mysql.com
Subject: How can you tell if a table is corrupted?
Hi all,
Say, is there a way to tell if a table has been corrupted? We're having
some weird things happening and the only thing
If mysql detects corruption it will stop further access to the table
until you repair it. It is possible for corruption to happen where
mysql can't detect it. If you suspect corruption run a repair on the
table.
On 12/11/05, Subscriptions <[EMAIL PROTECTED]> wrote:
> Hi all,
> Sa
Hi all,
Say, is there a way to tell if a table has been corrupted? We're having some
weird things happening and the only thing I can think of is possible corruption
of a table, but is there anything you can do to find out?
Jenifer
';
>
> Now I want to validate that the user-enterred-value is only a numeric
> value...
> (the major problem is where users enter special characters that leads to
> exceptions / errors being thrown - like if the user enterred ' (a single
> quote) that would close the
"C.R.Vegelin" <[EMAIL PROTECTED]> wrote:
>
> Hi everybody,
> I looked for a function to test whether a string is numeric (having
> characters 0..9 only). I found in the 5.0 manual Cast() and Convert(), but
> I don't think these do what I need. Any suggestion what function to use ?
> Thanks in adva
here users enter special characters that leads to
exceptions / errors being thrown - like if the user enterred ' (a single
quote) that would close the string and the %' would be considered as an
invalid character..)
Thanks
- Anoop
On 12/3/05, Gleb Paharenko <[EMAIL PROTE
Hello.
Possible solution is to use REGEXP:
mysql> select '911' regexp '^[1-9]*$';
+-+
| '911' regexp '^[1-9]*$' |
+-+
| 1 |
+-+
mysql> select
Hi everybody,
I looked for a function to test whether a string is numeric (having characters
0..9 only).
I found in the 5.0 manual Cast() and Convert(), but I don't think these do what
I need.
Any suggestion what function to use ?
Thanks in advance, Cor
Thanks for everyone's input. Essentially, I summed up all the NEGs and
non-NEGs in a view and then use the 'if' logic to filter out the numbers.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
not what you wanted. However, what you want still isn't
very clear to me but this might help you get better data for your
application to make decisions from:
SELECT
sum(if(status1='neg',1,0)) as neg1
,sum(if(status1='pos',1,0)) as pos1
,sum(if(status2='neg
not what you wanted. However, what you want still isn't
very clear to me but this might help you get better data for your
application to make decisions from:
SELECT
sum(if(status1='neg',1,0)) as neg1
,sum(if(status1='pos',1,0)) as pos1
,sum(if(status2='neg
Gobi <[EMAIL PROTECTED]> wrote on 11/28/2005 10:34:37 AM:
> Felix Geerinckx wrote:
>
> >On 28/11/2005, Gobi wrote:
> >
> >
> >
> >>I need to write a select clause based on the following conditions:
> >>
> >>If all rows of status1
Felix Geerinckx wrote:
On 28/11/2005, Gobi wrote:
I need to write a select clause based on the following conditions:
If all rows of status1 == "Neg"
count all "Neg" rows in status1
else
check if all rows of status2 == "Neg"
count all "Neg"
On 28/11/2005, Gobi wrote:
> I need to write a select clause based on the following conditions:
>
> If all rows of status1 == "Neg"
> count all "Neg" rows in status1
> else
> check if all rows of status2 == "Neg"
> count all "Neg&quo
I have not used an 'if' clause in select before but I think I may have a
scenario which calls for it.
I have a table with the following sample data:
idx status1 status2
1"Neg""Neg"
2"Pos""Neg"
3"Neg"NULL
4
on 11/3/05 12:11 AM, John thegimper at [EMAIL PROTECTED] wrote:
> I dont want it to INSERT that row.
>
> Sample.txt
> name;category;price
> samsung;dvd;60
> siemens;mobile;40
> none;none;0
>
> Say i dont want to insert rows where category is mobile or price <= 0.
> So in this case only the 'sams
uBois <[EMAIL PROTECTED]>:
> At 1:16 +0100 11/3/05, John thegimper wrote:
> >Is it possible to specify and IF statement or IGNORE statement when
> >useing LOAD
> >DATA?
> >Example
> >
> >SET price = IF PRICE(< 20) THEN IGNORE
> >SET price = IGNO
At 1:16 +0100 11/3/05, John thegimper wrote:
Is it possible to specify and IF statement or IGNORE statement when
useing LOAD
DATA?
Example
SET price = IF PRICE(< 20) THEN IGNORE
SET price = IGNORE IF <20
What is the semantics of IGNORE? What do you expect to happen?
--
Paul DuBois,
Is it possible to specify and IF statement or IGNORE statement when useing LOAD
DATA?
Example
SET price = IF PRICE(< 20) THEN IGNORE
SET price = IGNORE IF <20
-
FREE E-MAIL IN 1 MINUTE!
- [EMAIL PROTECTED] - http://www.pc.nu
--
MySQL G
to get a major upgrade. I'll be in
MASSACHUSETTS the week of NOV 1st - 7th (2005). Ive got a number of
clients and appointments but if anyone wants to get together for a
lil chat/wrap/coding session ping me.
Thirdly, Many people have asked me to write a book, I'll tell you
straight up, Im not
> Maybe you could use
>
> SHOW TABLES LIKE 'your_table';
That's a great idea, I just tried it in several ways, like:
IF EXISTS (SHOW TABLES LIKE 'cfgbiz') THEN
SELECT siacnotifyto FROM cfgbiz
ELSE
SELECT '' as siacnotifyto
END IF;
On Thursday 06 October 2005 10:57 am, Ryan Stille wrote:
> I am converting some code from MSSQL to MySQL. In one place I need to
> have a conditional query depending on if a table exists or not. There
> are different versions of this application and the table only exists in
> some of
Ryan Stille wrote:
If I have to, I could resort to doing another query in my application
(SHOW TABLES) and seeing if my table was returned in that list. But I
was hoping for a more elegant way to do it, within the single query.
Maybe you could use
SHOW TABLES LIKE 'your_table';
> If 'SHOW COLUMNS FROM tablename' returns error 1146 (42S02), the
> table doesn't exist.
This causes my application (ColdFusion) to throw an exception.
If I have to, I could resort to doing another query in my application
(SHOW TABLES) and seeing if my table was returned
Ryan,
>I am converting some code from MSSQL to MySQL. In one place I need to
>have a conditional query depending on if a table exists or not. There
>are different versions of this application and the table only exists in
>some of them. Here is how it was done in MSSQL:
If '
I am converting some code from MSSQL to MySQL. In one place I need to
have a conditional query depending on if a table exists or not. There
are different versions of this application and the table only exists in
some of them. Here is how it was done in MSSQL:
IF OBJECT_ID('cfgbiz') I
Hello.
You can parse the output of 'SHOW CREATE TABLE' or 'SHOW COLUMNS'. See:
http://dev.mysql.com/doc/mysql/en/show-columns.html
http://dev.mysql.com/doc/mysql/en/show-create-table.html
Claire Lee wrote:
> I want to check if a column exists in a table
Hi,
2005/9/26, Peter Brawley <[EMAIL PROTECTED]>:
> Claire,
>
> >I want to check if a column exists in a table before I
> >do an alter table to add it. How do I do this in
> >mysql? Thanks.
other solution, do your query in all case and check for the return
erro
Claire,
>I want to check if a column exists in a table before I
>do an alter table to add it. How do I do this in
>mysql? Thanks.
If you are using MySQL 5.0, query information_schema.columns
(http://dev.mysql.com/doc/mysql/en/columns-table.html) for the table and
column. Otherwise
I want to check if a column exists in a table before I
do an alter table to add it. How do I do this in
mysql? Thanks.
Claire
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
MySQL
If I BEGIN a transaction and a piece of PHP code containing another
transaction is run, the second BEGIN commits the first transaction for me.
How can I tell if I am in an existing transaction so that I do not issue the
second BEGIN?
Thanks..
Andrew
--
MySQL General Mailing List
For list
Hi,
On Wed, Sep 21, 2005 at 02:40:26PM +0530, Jaspreet Singh wrote:
> Hi,
>
> I was trying to impose hard disk-quotas over MySQL database when i
> stumbled upon this bug. (Bug #7714)
>
> The Bug report says that, it has been comited in 4.0 branch. But release
> notes show me that it was been fix
At 7:10 PM -0700 8/17/05, Daevid Vincent wrote:
Does mySQL have a way to INSERT a new record if one doesn't exist (based
upon primary compound key)?
I see this "EXISTS" but not an example of how to use it with INSERT.
I see "INSERT... ON DUPLICATE KEY UPDATE col_name=expr&
At 19:10 -0700 8/17/05, Daevid Vincent wrote:
Does mySQL have a way to INSERT a new record if one doesn't exist (based
upon primary compound key)?
Isn't that how INSERT works already?
If what you mean is that you want no error to occur, perhaps you want
to use INSERT IGNORE inst
Daevid Vincent wrote:
Does mySQL have a way to INSERT a new record if one doesn't exist (based
upon primary compound key)?
I see this "EXISTS" but not an example of how to use it with INSERT.
I see "INSERT... ON DUPLICATE KEY UPDATE col_name=expr" which is very c
Does mySQL have a way to INSERT a new record if one doesn't exist (based
upon primary compound key)?
I see this "EXISTS" but not an example of how to use it with INSERT.
I see "INSERT... ON DUPLICATE KEY UPDATE col_name=expr" which is very close,
but I want it to do
Nuno Pereira wrote:
> Hi all,
>
> I have a MySQL server version "4.1.10a, for pc-linux-gnu (i686)"
> installed (from official binary RPMs) and running.
>
> My question is if there are problems from updating the server to the
> most current version of the 4.1.x ser
Hi all,
I have a MySQL server version "4.1.10a, for pc-linux-gnu (i686)"
installed (from official binary RPMs) and running.
My question is if there are problems from updating the server to the
most current version of the 4.1.x series, specially things that fail to
work, o
Hi,
What about SELECT count(*) FROM table1 - SELECT count(*) FROM table1
WHERE status = 1 ? (this query should be mush faster)
Regards,
Jocelyn
jpow wrote:
Hi everyone, I have this problem of slow "count *" when I use a where clause.
1. I have a table of ~1m rows.
2. There is a "status" c
Hi everyone, I have this problem of slow "count *" when I use a where clause.
1. I have a table of ~1m rows.
2. There is a "status" column which can be 0 or 1.
3. Most of the rows have a status of 0, but maybe 10% of them have a
status of 1.
4. I need to know how many records are status 1 / 0 for
Sebastian <[EMAIL PROTECTED]> wrote on 06/05/2005 02:23:45 AM:
> I have two fields: topic | title
> topic does not always have data in it, so i want to select `title` when
> `topic` is null..
> i thought i could do this (does not work):
> IF(title IS NULL, topic, title)
Sebastian wrote:
I have two fields: topic | title
topic does not always have data in it, so i want to select `title` when
`topic` is null..
i thought i could do this (does not work):
IF(title IS NULL, topic, title) AS heading
Thanks.
There is nothing wrong with this, as long as it is
Sebastian wrote:
I have two fields: topic | title
topic does not always have data in it, so i want to select `title` when
`topic` is null..
i thought i could do this (does not work):
IF(title IS NULL, topic, title) AS heading
Thanks.
Try
SELECT IFNULL(title, topic) AS heading
-Simon
I have two fields: topic | title
topic does not always have data in it, so i want to select `title` when
`topic` is null..
i thought i could do this (does not work):
IF(title IS NULL, topic, title) AS heading
Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com
t3.`title`;
What this does is to show all the titles under catid ("Category ID")
that is published.
0 = not publish
1 = publish
The problem is, even if the `published` column is 0, it will still show
the title.
I tried to do the reverse, `published`=0, and it will still show
everyt
`='7' AND
> t4.`published`=1 GROUP BY `sid` ORDER BY t3.`title`;
>
> What this does is to show all the titles under catid ("Category ID")
that
> is published.
>
> 0 = not publish
> 1 = publish
>
> The problem is, even if the `published` column
o show all the titles under catid ("Category ID") that
is published.
0 = not publish
1 = publish
The problem is, even if the `published` column is 0, it will still show the
title.
I tried to do the reverse, `published`=0, and it will still show everything
instead of just showing the unpu
anagorn wrote:
I am trying to get "default" value for every ID of JOIN if ON clause were
unsucessfull.
In my example, I am trying to get "english" rows, but if they are not
available, I would like to get
default - "estonian".
I have two tables ie.
table1:
id
1
I am trying to get "default" value for every ID of JOIN if ON clause were
unsucessfull.
In my example, I am trying to get "english" rows, but if they are not
available, I would like to get
default - "estonian".
I have two tables ie.
table1:
id
1
2
3
table2
Hi,
What will happen is that the rdbms will lock the row for you, updates it and
unlock it.
This is transparent for the user.
there will be a wait (not a problem) if another user want to update the same
row. When the first transaction is committed, the second can hold a lock for
update.
There is
Hi!
If there is no any lock at all while one update a row, what it is going to
happen to my SQL database? In which cases, it might cause problems? Anyone know?
Thanks
__
Switch to Netscape Internet Service.
As low as $9.95 a
Harrison Fisk wrote:
There isn't really any way to "use" concurrent INSERT. It happens
automatically if possible. However there are a few things you can do
to help it along, such as OPTIMIZE after you DELETE large portions of
the table. Also it does have to enabled in L
;t need to read the disk because the
filesystem buffer has the blocks in memory.
In this config will the SELECTs block for the INSERTs? I guess they
would!
Yes. If MySQL has to actually read the table or indexes then it will
set locks to do so, as appropriate to the storage engine in use.
Ke
y the SELECT won't wait
for any locks. So someone can have a WRITE lock on the table, and
your SELECT will still run. If you have a query cache miss, then it
will need to acquire the READ lock like a normal SELECT.
Yes... I realize. The issue is though that only a small percentage of
our q
can have a WRITE lock on the table, and your
SELECT will still run. If you have a query cache miss, then it will
need to acquire the READ lock like a normal SELECT.
Not only THAT but it doesn't need to read the disk because the
filesystem buffer has the blocks in memory.
In this config will th
option of using MyISAM with no DELETEd rows
(since it can then support concurrent insert.)
Kevin
--
Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com.
See irc.freenode.net #rojo if you want to chat.
Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html
Kevin A. Burton, Loca
>
> -Original Message-
> From: Jacek Becla [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 03, 2005 4:00 PM
> To: Jay Blanchard
> Cc: [EMAIL PROTECTED]
> Subject: Re: how to check if keys disabled?
>
> Jay
>
> Are you sure? DESCRIBE tells me the table h
TECTED]
Sent: Tuesday, May 03, 2005 4:00 PM
To: Jay Blanchard
Cc: mysql@lists.mysql.com
Subject: Re: how to check if keys disabled?
Jay
Are you sure? DESCRIBE tells me the table has an index, but not whether
the index is enabled or not:
mysql> create table t1 (x int primary key);
Query OK, 0 rows
Try show index from t1;
Show index from t2;
-Original Message-
From: Jacek Becla [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 03, 2005 4:00 PM
To: Jay Blanchard
Cc: mysql@lists.mysql.com
Subject: Re: how to check if keys disabled?
Jay
Are you sure? DESCRIBE tells me the table has an
1) | NO | PRI | | |
+---+-+--+-+-+---+
1 row in set (0.00 sec)
Am I missing something?
thanks,
Jacek
Jay Blanchard wrote:
[snip]
How can I find out if keys are enabled/disabled for a given table?
Suppose I do:
create table t1 (x int primary key);
create table t2 (x int primary key);
alter table t1 disabl
[snip]
How can I find out if keys are enabled/disabled for a given table?
Suppose I do:
create table t1 (x int primary key);
create table t2 (x int primary key);
alter table t1 disable keys;
How can I now find out that t1 has keys disabled, and t2 enabled?
[/snip]
DESCRIBE t1 or DESCRIBE t2
Hi,
How can I find out if keys are enabled/disabled for a given table?
Suppose I do:
create table t1 (x int primary key);
create table t2 (x int primary key);
alter table t1 disable keys;
How can I now find out that t1 has keys disabled, and t2 enabled?
thanks,
Jacek
--
MySQL General Mailing List
s like 'jst%_foo'
looks like it would work just fine. Two questions:
What is the column name returned and can I do an ORDER BY? If so, then
I can just check the first and last rows in the results to determine
the numeric range.
My bad - server version is 3.23.x. Dictated by
the column name returned and can I do an ORDER BY? If so,
then I can just check the first and last rows in the results to
determine the numeric range.
My bad - server version is 3.23.x. Dictated by this (old as alabama)
application. They refuse to support newer versions of MySQL.
- O
Hey, thanks.
show tables like 'jst%_foo'
looks like it would work just fine. Two questions:
What is the column name returned and can I do an ORDER BY? If so, then I
can just check the first and last rows in the results to determine the
numeric range.
My bad - server version
I don't remember what commands are available in 3.21 but try these
show tables like 'table_name';
then check mysql_num_rows on the result.
describe table;
check mysql_num_rows
show tables;
then pick out the table name;
3.21 is old as alabama (forrest gump) it's time for an upgrade :)
Jim McAtee wro
We're running an application that creates table names in a numeric
sequence. For example:
jst998_foo
jst998_bar
jst999_foo
jst999_bar
jst0001000_foo
jst0001000_bar
jst0001001_foo
jst0001001_bar
I need to write a maintenance app that first needs to determine the
numeric range of
DECLARE rowexists INT(6);
select count(*) into rowexists from esr_cartitems_data
where customer_id=mcustid and item_id=mprodid;
if rowexists>0 THEN
mvalidate := 'TRUE'
else
mvalidate := 'FALSE';
end if;
END;
Any help is welcome .
Thanks,
Sreedhar.
___
quot; := 'TRUE' "
CREATE PROCEDURE cart_items_validate
(IN mcustid INT ,IN mprodid varchar(10),
OUT mvalidate varchar(10))
BEGIN
DECLARE rowexists INT(6);
select count(*) into rowexists from esr_cartitems_data
where customer_id=mcustid and item_id=mprodid;
if rowexists>0 THEN
mva
CREATE PROCEDURE cart_items_validate
> (IN mcustid INT ,IN mprodid varchar(10),
> OUT mvalidate varchar(10))
>
> BEGIN
>
> DECLARE rowexists INT(6);
>
>
> select count(*) into rowexists from esr_cartitems_data
>
> where customer_id=mcustid and item_id=mpr
10))
BEGIN
DECLARE rowexists INT(6);
select count(*) into rowexists from esr_cartitems_data
where customer_id=mcustid and item_id=mprodid;
if rowexists>0 THEN
mvalidate := 'TRUE'
else
mvalidate := 'FALSE';
end if;
END;
#x27;mysql@lists.mysql.com '
Subject: re: using if in select statement
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
My boss and I were playing with using select statements, and we can
actually execute subqueries as an option if the result is true or false.
Is this expected behavior, or is it something th
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
My boss and I were playing with using select statements, and we can
actually execute subqueries as an option if the result is true or false.
Is this expected behavior, or is it something that may be fixed in a
revision, before I begin to depend on it
or all FK's with the same number of R1-R2
pairs in the BLEAH group, and I do it like this...
SELECT
FK,
COUNT(DISTINCT IF(BLEAH='Y',CONCAT(R1,"-",R2),NULL)) AS BLING
GROUP BY
FK
HAVING
BLING = 5;
The problem is that CONCAT. I don't like the look of it. I
Hello.
If you are able to use a DBUG package on a production server - do it. You
may limit debugging to the list of named functions with 'f' flag. See:
http://dev.mysql.com/doc/mysql/en/the-dbug-package.html
Send an output of 'SHOW VARIABLES', 'SHOW STATUS&
]
Sent: Sat 02 April 2005 13:31
To: mysql@lists.mysql.com
Subject: Re: Can't create a new thread (errno 11). If you are not out of
available memory, you can consult the manual for a possible OS-dependent
bug'
Hello.
I don't know. With additional information we could make more ex
gt;>
>>>mysql-standard-4.1.10a-pc-linux-gnu-i686. I'm still getting this error
>>
>>
>>>- does anyone have any ideas?=20
>>
>>
>>
>>>Cheers,
>>
>>
>>
>>>Andrew
>>
>>
eas?=20
Cheers,
Andrew
-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Thu 31 March 2005 02:31
To: mysql@lists.mysql.com
Subject: Re: Can't create a new thread (errno 11). If you are not out of
available memory, you can consult the manual for a possible OS-depend
301 - 400 of 951 matches
Mail list logo