Sub Selects, Alias Names and stored procedures

2005-11-04 Thread Gordon Bruce
After reading one of the recent posts from Gobi [EMAIL PROTECTED] I took his successful query and modified it for one of my tables. It indeed produce the correct result, but in the process raised some questions. 1. Why do list_ID and acct_ID not have to be qualified with a table name

Re: Sub Selects, Alias Names and stored procedures

2005-11-04 Thread Rhino
:-) Rhino - Original Message - From: Gordon Bruce [EMAIL PROTECTED] To: MySQL List mysql@lists.mysql.com Sent: Friday, November 04, 2005 2:51 PM Subject: Sub Selects, Alias Names and stored procedures After reading one of the recent posts from Gobi [EMAIL PROTECTED] I took his successful query

Question on sub-selects

2004-01-28 Thread Deven Phillips
Hello, I have a question that someone here may or may not be able to answer (I think perhaps MySQL is incapable of a solution). I have a program which uses a MySQL database to help create a playlist for a ShoutCast stream. There is a web site associated with the web-radio. Users of the

RE: Question on sub-selects

2004-01-28 Thread Jeffrey Smelser
Hello, I have a question that someone here may or may not be able to answer (I think perhaps MySQL is incapable of a solution). I have a program which uses a MySQL database to help create a playlist for a ShoutCast stream. There is a web site associated with the web-radio. Users

Re: Question on sub-selects

2004-01-28 Thread Tobias Asplund
On Wed, 28 Jan 2004, Deven Phillips wrote: Hello, There is a web site associated with the web-radio. Users of the web site can rate songs which are contained in the database. The rating system works such that users can rate songs from +3 to -2. Now, what I would like to accomplish is to

Sub-selects

2003-09-24 Thread fbeltran
According to documentation, in MySQL version 4.0, it is possible to use sub-selects, but i haven't found the correct syntax... Does any one know how to do this? I need someting like this: Select a, (select sum(b) from T2 where T2.a=T1.a) as b from T1

Re: Sub-selects

2003-09-24 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-09-24 02:32:10 -0600: According to documentation, in MySQL version 4.0, it is possible to use sub-selects According to what documentation? -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle

Re: Sub-selects

2003-09-24 Thread Andy Jefferson
[EMAIL PROTECTED] wrote: According to documentation, in MySQL version 4.0, it is possible to use sub-selects, but i haven't found the correct syntax... Does any one know how to do this? I need someting like this: Select a, (select sum(b) from T2 where T2.a=T1.a) as b from T1 In MySQL 4.1

Re: Sub-selects

2003-09-24 Thread Roger Baklund
* fbeltran According to documentation, in MySQL version 4.0, it is possible to use sub-selects, but i haven't found the correct syntax... Like others have said, it's from version 4.1: URL: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html Does any one know how to do this? I need

Do all mysql versions from 4.1 support sub selects?

2003-06-09 Thread Nils Valentin
Hi Mysql List, Will all mysql versions (std, max and debug) from 4.1 support sub selects or will this only be included f.e in the max version ? Best regards -- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp -- MySQL General Mailing List

Re: Do all mysql versions from 4.1 support sub selects?

2003-06-09 Thread Egor Egorov
Nils Valentin [EMAIL PROTECTED] wrote: Will all mysql versions (std, max and debug) from 4.1 support sub selects or will this only be included f.e in the max version ? In all. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored

sub-selects and php

2003-03-28 Thread Udo Schubert
hi there! i'm wondering about these sub-selects and the mysql-version peroblems they cause! somewhere on mysql.com is said: sub-selects need mysql version 4.1 and up! BUT: i have a statement insert into foo select bar from bartable; this thing works if i enter it on the mysql-shell. (also

AW: sub-selects and php

2003-03-28 Thread Udo Schubert
Does the PHP user have insert authority? grant insert,alter,select on theTable to phpuser; you mean this? php user is the user with whom the php file connects to the db right? i executed every statement from the shell as that user,too! best regards udo -- MySQL General Mailing List

Re: sub-selects and php

2003-03-28 Thread gerald_clark
You did not show us your actual insert statement, but You can not insert into a table listed anywhere in the select. Udo Schubert wrote: hi there! i'm wondering about these sub-selects and the mysql-version peroblems they cause! somewhere on mysql.com is said: sub-selects need mysql

AW: sub-selects and php

2003-03-28 Thread Udo Schubert
You did not show us your actual insert statement, but You can not insert into a table listed anywhere in the select. sorry,man. i should have been given you the whole thing: here it comes: db one with table person (firstname,name,email,phone,fax,hashval,flag,etc...) and table hashvalue

re: RE: MySql 4.1 Sub Selects

2002-11-11 Thread Victoria Reznichenko
daniel, Monday, November 11, 2002, 3:51:25 AM, you wrote: d will 4.1 hopefully have stored procedure functionality ? Nope. Stored procedures will be implemented around v5.0 -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net

re[2]: MySql 4.1 Sub Selects

2002-11-11 Thread Richard Morton
: Monday, November 11, 2002 11:16 AM Subject: Re: MySql 4.1 Sub Selects Greg Matthews wrote: clause) instead of EXISTS -- seems like a tail wagging the dog strategy. Isn't EXISTS a lot more efficient than an inner join? Well, its more efficient if it exists, I guess

RE: RE: MySql 4.1 Sub Selects

2002-11-11 Thread Dan Rossi
: Monday, November 11, 2002 11:00 PM To: [EMAIL PROTECTED] Subject: re: RE: MySql 4.1 Sub Selects daniel, Monday, November 11, 2002, 3:51:25 AM, you wrote: d will 4.1 hopefully have stored procedure functionality ? Nope. Stored procedures will be implemented around v5.0 -- For technical support

Re: re[2]: MySql 4.1 Sub Selects

2002-11-11 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 11 November 2002 13:03, Richard Morton wrote: according to this link... 4.1 will have stored procedures http://www.mysql.com/products/mysql-4.0/index.html Oops, that page needs to be updated. Stored procedures will come with MySQL 5.0,

Re: RE: MySql 4.1 Sub Selects and not stored procedures

2002-11-11 Thread Greg Matthews
, Greg. - Original Message - From: Dan Rossi [EMAIL PROTECTED] To: Victoria Reznichenko [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, November 11, 2002 11:04 PM Subject: RE: RE: MySql 4.1 Sub Selects damn , i read it was 4.1 i guess we have to wait a bit then, i wish i could program

RE: RE: MySql 4.1 Sub Selects and not stored procedures

2002-11-11 Thread Arthur Fuller
Message- From: Greg Matthews [mailto:greg55;ozemail.com.au] Sent: Monday, November 11, 2002 7:38 AM To: [EMAIL PROTECTED] Subject: Re: RE: MySql 4.1 Sub Selects and not stored procedures hey, can i hijack my message back?...this thread is about the performance of subselects, not stored procedures

Re: MySql 4.1 Sub Selects

2002-11-11 Thread Michael T. Babcock
Dan Rossi wrote: damn , i read it was 4.1 i guess we have to wait a bit then, i wish i could program some c ++ to hurry it along a bit, i dont really have access to DB's like oracle to learn stored procedure stuff Don't forget that with MySQL, you can link in external procedures though ...

Re: MySql 4.1 Sub Selects and not stored procedures

2002-11-11 Thread Dan Nelson
In the last episode (Nov 11), Greg Matthews said: hey, can i hijack my message back?...this thread is about the performance of subselects, not stored procedures. go write your own message :-)... sothe original question is if someone would be nice enough to answer.. Do any MySql

Re: RE: MySql 4.1 Sub Selects and not stored procedures

2002-11-11 Thread Greg Matthews
: Tuesday, November 12, 2002 12:02 AM Subject: RE: RE: MySql 4.1 Sub Selects and not stored procedures I'm not sure where you're getting your information (Typically, db vendors recommend you use an exists clause, not a join when testing for the presence of child data because it's faster

Re: RE: MySql 4.1 Sub Selects and not stored procedures

2002-11-11 Thread John Ragan
11:04 PM Subject: RE: RE: MySql 4.1 Sub Selects damn , i read it was 4.1 i guess we have to wait a bit then, i wish i could program some c ++ to hurry it along a bit, i dont really have access to DB's like oracle to learn stored procedure stuff -Original Message- From

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Jeremy Zawodny
On Sun, Nov 10, 2002 at 05:51:43PM +1100, Greg Matthews wrote: It would be a huge help to get hold of MySql 4.1. What's shaken out mean? Is 4.1 still mid-development, or is it in alpha, more or less finished, and needs debugging? Is there anyway soon that someone could build and release

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Jocelyn Fournier
optimised (it will be started after finishing main subselect constructions). Regards, Jocelyn - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Greg Matthews [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, November 10, 2002 10:00 AM Subject: Re: MySql 4.1 Sub Selects

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Greg Matthews
: [EMAIL PROTECTED] Sent: Sunday, November 10, 2002 9:00 PM Subject: Re: MySql 4.1 Sub Selects On Sun, Nov 10, 2002 at 05:51:43PM +1100, Greg Matthews wrote: It would be a huge help to get hold of MySql 4.1. What's shaken out mean? Is 4.1 still mid-development, or is it in alpha, more

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Jeremy Zawodny
On Sun, Nov 10, 2002 at 09:29:52PM +1100, Greg Matthews wrote: Jeremy, I'm not a C/C++ coder so couldn't really help unless a binary was available. At the same time, I understand that you'd be wasting your time building binaries unless you were happy that the code was at a certain level

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Greg Matthews
, 2002 11:16 PM Subject: Re: MySql 4.1 Sub Selects In article 014701c288a4$1b1bb550$0100a8c0@dev, Greg Matthews [EMAIL PROTECTED] writes: Your call. If a 4.1 binary was available then I'd spend time testing it with a J2EE app under JBoss on Windows XP -- otherwise i'll just have to wait

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Michael T. Babcock
Greg Matthews wrote: clause) instead of EXISTS -- seems like a tail wagging the dog strategy. Isn't EXISTS a lot more efficient than an inner join? Well, its more efficient if it exists, I guess ... but if it doesn't exist on your platform (MySQL), then its pretty inefficient, really. We're

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Greg Matthews
: Michael T. Babcock [EMAIL PROTECTED] To: Greg Matthews [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, November 11, 2002 11:16 AM Subject: Re: MySql 4.1 Sub Selects Greg Matthews wrote: clause) instead of EXISTS -- seems like a tail wagging the dog strategy. Isn't EXISTS a lot more

RE: MySql 4.1 Sub Selects

2002-11-10 Thread daniel
consideration of sometimes putting DISTINCT in the select statement. Thanks a lot, Greg. - Original Message - From: Michael T. Babcock [EMAIL PROTECTED] To: Greg Matthews [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, November 11, 2002 11:16 AM Subject: Re: MySql 4.1 Sub Selects Greg

MySql 4.1 Sub Selects

2002-11-09 Thread Greg Matthews
All, Anyone have any rough idea when 4.1 (with SubSelects) is due to be released? Thanks, Greg. sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/

Re: MySql 4.1 Sub Selects

2002-11-09 Thread Jeremy Zawodny
On Sun, Nov 10, 2002 at 03:45:04PM +1100, Greg Matthews wrote: All, Anyone have any rough idea when 4.1 (with SubSelects) is due to be released? Well, if you pull the source code, it's there. But I suspect it'll be a few months before you start seeing pre-built binaries available. There's a

Re: MySql 4.1 Sub Selects

2002-11-09 Thread Greg Matthews
state. Greg. - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Greg Matthews [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, November 10, 2002 4:21 PM Subject: Re: MySql 4.1 Sub Selects On Sun, Nov 10, 2002 at 03:45:04PM +1100, Greg Matthews wrote: All, Anyone

Re: Sub selects

2002-10-18 Thread Aurelio A.
// This is a generic function which returns the results // of a query in list form, so they can be used in place // of nested queries until it is implemented in MySQL // If there are no values, it returns the string // Empty Nested Set by default. function getnestedvals($field, $table,

Sub selects

2002-10-13 Thread Ershad Shafi Chowdhury
Hi All! This is my first question to the list. Can some one help out a newbie with a simple question please? The closest thing I found is a php query to do this using temporary tables but it takes too long. Table 1 NameDate John01/10 Jack01/10 Jill01/10 Mary02/10 John

Re: Sub-selects

2002-06-20 Thread Gurhan Ozen
Message - From: Darley, Terry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 20, 2002 10:29 AM Subject: Sub-selects To Whom It May Concern: I've just joined the mailing list for problem sharing/helping and the first 2 e-mails I received, demonstrates a need for sub-selects

RE: Sub-selects

2002-06-20 Thread Jon Frisby
11:35 AM To: Darley, Terry; [EMAIL PROTECTED] Subject: Re: Sub-selects Take a look at: http://www.mysql.com/doc/T/O/TODO.html and http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html You can do what you want to do easily by using an API (PHP, Perl, etc.) Is it possible for you to use

Sub-selects for WHERE clauses

2002-05-28 Thread Geoff Lane
I'm a comparative MySQL newbie who is struggling with sub-selects. In other DBMS's, I can use sub-selects to return a set that I can use in a condition of a WHERE clause. An example is the recent query by Ciprian Trofin about finding the cheapest price of a product. In other DBMS's I would use

Re: Sub-selects for WHERE clauses

2002-05-28 Thread Benjamin Pflugmann
Hi. That's an FAQ and explained in the tutorial: http://www.mysql.com/doc/e/x/example-Maximum-row.html Regards, Benjamin. On Tue, May 28, 2002 at 12:05:19PM +0100, [EMAIL PROTECTED] wrote: I'm a comparative MySQL newbie who is struggling with sub-selects. In other DBMS's, I can use

Re: Sub-selects for WHERE clauses

2002-05-28 Thread Geoff Lane
WHERE condition AND id NOT IN (SELECT id FROM tblcount); However, thanks to off-list correspondence, I now know that I need to do some research into temporary tables because these can provide most (if not all) the functionality of sub-selects. Thanks again to all, -- Geoff Lane Cornwall, UK [EMAIL

sub-selects

2002-05-03 Thread Alex
i have to use a statement like: SELECT CODICE FROM TABSIC WHERE COM=1 AND SEN=1 AND PRI=1 AND CODICEALL(SELECT CODICE_TABSIC FROM ARCHIVIO_SICU_MIN WHERE (CODICE_ARCHIVIO=342)) but mysql doesn't support inner select. What statement should i use instead of this one ? Thanks... Alex.

Re: sub-selects

2002-05-03 Thread sucker
Alex [EMAIL PROTECTED] schrieb im Newsbeitrag news:aatd8o$1jhk$[EMAIL PROTECTED]... i have to use a statement like: SELECT CODICE FROM TABSIC WHERE COM=1 AND SEN=1 AND PRI=1 AND CODICEALL(SELECT CODICE_TABSIC FROM ARCHIVIO_SICU_MIN WHERE (CODICE_ARCHIVIO=342)) but mysql doesn't support

Re: sub selects

2002-04-23 Thread Bill Easton
clause will filter these out. Check out LEFT [OUTER] JOIN in the manual... From: [EMAIL PROTECTED] To: Mysql. Com [EMAIL PROTECTED] Subject: sub selects Date: Mon, 22 Apr 2002 15:34:22 +0100 I know that mysql does not support sub selects but I want to be able to do the following: I have

sub selects

2002-04-22 Thread michael.johnson
I know that mysql does not support sub selects but I want to be able to do the following: I have a table with all my leads in called leads. The table has a unique ref for each lead called refnumberid I have a table with leads in and products that leads have asked not to be mailed on the table

RE: Do not understand a method without sub-selects

2002-01-02 Thread Terje Kristensen
: PPSlim [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 4:52 AM To: [EMAIL PROTECTED] Subject: Do not understand a method without sub-selects I have one single table, logging site activity as a security precaution. I want to generate a report, including items of a certain type

Do not understand a method without sub-selects

2002-01-01 Thread PPSlim
I have one single table, logging site activity as a security precaution. I want to generate a report, including items of a certain type, but only if a seperate type has not taken place after the timestamp within the first type. log_data_sig

sub selects

2001-12-14 Thread Joel Wickard
can you perform sub selects in mysql? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED

Re: sub selects

2001-12-14 Thread Etienne Marcotte
no, but you can acheive the same results please consult the manual http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html Etienne Joel Wickard wrote: can you perform sub selects in mysql? - Before posting, please

RE: sub selects

2001-12-14 Thread Rick Emery
no -Original Message- From: Joel Wickard [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 2:51 PM To: [EMAIL PROTECTED] Subject: sub selects can you perform sub selects in mysql? - Before posting, please

Re: sub selects

2001-12-14 Thread sherzodR
As far as I know, not yet Joel Wickard wrote: JW: Date: Fri, 14 Dec 2001 12:50:39 -0800 JW: From: Joel Wickard [EMAIL PROTECTED] JW: To: [EMAIL PROTECTED] JW: Subject: sub selects JW: JW: can you perform sub selects in mysql? JW: JW: JW

Re: sub selects

2001-12-14 Thread Robert Alexander
At 12:50 -0800 2001/12/14, Joel Wickard wrote: can you perform sub selects in mysql? The quick answer is coming soon. Please see: http://www.mysql.com/doc/D/i/Differences_from_ANSI.html and http://www.mysql.com/doc/T/O/TODO_future.html HTH /Rob

Need help: workaround for sub-selects?

2001-08-06 Thread Erlend Stromsvik
(sorry for the double-post, but I had wrong subcect on the previous one) Hi I having a little trouble with mysql, with the lack of sub-selects. Yes, I have read about joins, both the manual and from the MySQL book by Paul Dubois, but none of those provide any 'real' info about what to do

delete sub-selects

2001-07-20 Thread Andrius Armonas
hello, I'm running mysql 3.23.39. Could anybody explain me how to do this in mysql (without sub-selects): delete from IP where id in ( select id from USERS where MK='0032' ) Thanks. .:: Andrius Armonas ::. .:: [EMAIL PROTECTED] ::. .:: http://baubas.andrius.org

Re: delete sub-selects

2001-07-20 Thread Steve Werby
Andrius Armonas [EMAIL PROTECTED] wrote: I'm running mysql 3.23.39. Could anybody explain me how to do this in mysql (without sub-selects): delete from IP where id in ( select id from USERS where MK='0032' ) One solution is to build a list of id values from the users table in your

Sub-selects in a insert statement - is it possible to rewrite?

2001-06-25 Thread Andreas D. Landmark
As I've understood it mysql doesn't support sub-selects inside for example insert statements (apart from inset ... select). Background-stuff: What I'm working on is parsing logfiles and inserting them into a mysql database through the C API, to minimize traffic and to maximize time, I

RE: Sub-selects in a insert statement - is it possible to rewrite?

2001-06-25 Thread Chris Bolt
This is how I'd like the query to work: insert into host (host_id, host_IP) values ((select from mail mail_id where mail_addr = [EMAIL PROTECTED]), '127.0.0.1') Try: insert into host (host_id, host_IP) select mail_id, '127.0.0.1' from mail where mail_addr = '[EMAIL PROTECTED]';

Re: Sub-Selects

2001-02-12 Thread Sinisa Milivojevic
Gunnar Ingvi writes: Hi there ! I?m wondering if there is planned support for Sub-Selects (e.g. HAVING and so on) in upcoming versions? I think this is very important to implement. Best regards, Gunnar Ingvi [EMAIL PROTECTED] Hi! It will come in version 4.1. Regards

Sub selects working around

2001-01-16 Thread Eric Frazier
Hi, I am guessing this is the kind of problem that would be easier to solve with a sub select SELECT simpleparts.category,simpleparts.partnumber,simpleparts.manufacturer,simplep arts.descrp,ABS(packagesParts.pri) as abPRI,categories.sortorder FROM ((packagenames LEFT JOIN packagesParts ON

Re: Sub selects working around

2001-01-16 Thread Jan Dvorak
Hi Eric, I'll second Bob Hall's opinion. One could extend a query so that it checks also your additional condition. You haven't gotten to the 'group by' and 'having' goodies, that's the hint. But this would make it over-complicated, and MySQL could run into problems when attempting to evaluate