Call for Articles for MySQL Magazine - Summer Issue

2008-05-02 Thread B. Keith Murphy
Hey everyone!! Just wanted you to know that it's "that time".  The 
summer issue of MySQL Magazine will be coming out July the 15th.  That 
means that it is time to start gathering the articles.  If you have 
interest in having your words read by thousands of people and having 
fame and fortune come to you (ok..maybe fame but probably not fortune) 
than you should submit an idea for an article.  *Articles must be 
completed by June the 15th so don't delay*!!


Have I got your interest?  Send me an idea for an article to bmurphy AT 
paragon-cs.com.  Anything relating to DBA work on MySQL or software 
development around MySQL will be considered.


--
Keith Murphy


editor: MySQL Magazine 
http://www.mysqlzine.net



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Update with select

2008-05-02 Thread Rob Wultsch
>  -Original Message-
>  From: Albert E. Whale [mailto:[EMAIL PROTECTED]
>  Sent: Friday, May 02, 2008 4:06 PM
>  To: mysql@lists.mysql.com
>  Subject: Update with select
>
>  I am trying to update a field on a record in a table.  Here is the
>  statement I created:
>
>  UPDATE pdata SET pvalue = ( SELECT pvalue
>  FROM pdata
>  WHERE pentrytime =1207022400 )
>  WHERE pentrytime =117540;
>
>  However, I get the following error:
>
>  |#1093 - You can't specify target table 'pdata' for update in FROM clause
>
>  What can I use to fix this?
>  |

"Currently, you cannot update a table and select from the same table
in a subquery."
http://dev.mysql.com/doc/refman/5.0/en/update.html

Subqueries in mysql in general are well supported.

The solution already posted is what I would do.

-- 
Rob Wultsch
[EMAIL PROTECTED]
wultsch (aim)

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Update with select

2008-05-02 Thread Rolando Edwards
You are better off with an UPDATE JOIN

UPDATE pdata A,pdata B
SET A.pvalue = B.pvalue
WHERE A.pentrytime = 117540
AND   B.pentrytime = 1207022400;

Give it a try !!!

-Original Message-
From: Albert E. Whale [mailto:[EMAIL PROTECTED]
Sent: Friday, May 02, 2008 4:06 PM
To: mysql@lists.mysql.com
Subject: Update with select

I am trying to update a field on a record in a table.  Here is the
statement I created:

UPDATE pdata SET pvalue = ( SELECT pvalue
FROM pdata
WHERE pentrytime =1207022400 )
WHERE pentrytime =117540;

However, I get the following error:

|#1093 - You can't specify target table 'pdata' for update in FROM clause

What can I use to fix this?
|
--
Albert E. Whale, CHS CISA CISSP
Sr. Security, Network, Risk Assessment and Systems Consultant

ABS Computer Technology, Inc.  - Email,
Internet and Security Consultants
SPAMZapper  - No-JunkMail.com
 - *True Spam Elimination*.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Update with select

2008-05-02 Thread Albert E. Whale
I am trying to update a field on a record in a table.  Here is the 
statement I created:


UPDATE pdata SET pvalue = ( SELECT pvalue
FROM pdata
WHERE pentrytime =1207022400 )
WHERE pentrytime =117540;

However, I get the following error:

|#1093 - You can't specify target table 'pdata' for update in FROM clause

What can I use to fix this?
|
--
Albert E. Whale, CHS CISA CISSP
Sr. Security, Network, Risk Assessment and Systems Consultant

ABS Computer Technology, Inc.  - Email, 
Internet and Security Consultants
SPAMZapper  - No-JunkMail.com 
 - *True Spam Elimination*.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Visio Stencils

2008-05-02 Thread Rajesh Mehrotra
Google:

http://www.google.com/search?hl=en&q=MySQL+Visio+stencils&btnG=Google+Se
arch

-Raj.


-Original Message-
From: Ben Wiechman [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 02, 2008 12:39 PM
To: mysql@lists.mysql.com
Subject: Visio Stencils

Does anyone have a set of MySQL Visio stencils? Does such a beast exist?

 

Ben Wiechman



 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Age old order by rand() issue

2008-05-02 Thread Rob Wultsch
On Fri, May 2, 2008 at 6:58 AM, Scott Haneda <[EMAIL PROTECTED]> wrote:
>
> > I have seen nicer fast random row implement, but that will work.
>
>
>  Do you happen to have a snip of it, the one I have seems to lean pretty
> heavy as far as I can tell, and on occasion, though rare, also sends me an
> empty result set.
>  --
>  Scott
>  [EMAIL PROTECTED]
>

You should not be getting empty results with the second/third query.
The reason you were (probably) previously getting empty results with
the first query was because you were doing the join using USING (aka
=) rather than >= .  You were also doing a WHERE clause on that could
have removed the random result.

My only problem with what you are using is that it is more likely to
give a large results than a small one. Take a look at the
http://jan.kneschke.de/projects/mysql/order-by-rand/

You probably do not need this.
If you have a large data set, you probably don't want this.

-- 
Rob Wultsch
[EMAIL PROTECTED]
wultsch (aim)

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Visio Stencils

2008-05-02 Thread Ben Wiechman
Does anyone have a set of MySQL Visio stencils? Does such a beast exist?

 

Ben Wiechman



 



Re: Age old order by rand() issue

2008-05-02 Thread Scott Haneda

I have seen nicer fast random row implement, but that will work.



Do you happen to have a snip of it, the one I have seems to lean  
pretty heavy as far as I can tell, and on occasion, though rare, also  
sends me an empty result set.

--
Scott
[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



deneme

2008-05-02 Thread Huseyin ERSOY

deneme


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



ot: callablestatement

2008-05-02 Thread Rilawich Ango
HI ,
I am using java to call store procedure as following.  However, the
program hangs when it reaches the line 30 below.  Any clue to make it
works?

...
30: CallableStatement cs = myConn.prepareCall({ call proc1() });
31: cs.execute();
...

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]