Re: Sub Selects, Alias Names and stored procedures

2005-11-04 Thread Rhino
L's implementation of SQL :-) Rhino - Original Message - From: "Gordon Bruce" <[EMAIL PROTECTED]> To: "MySQL List" 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 [E

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 or

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 t

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-radi

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 web

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: http://www.mysql.com/doc/en/ANSI_diff_Subqueries.html > > Does any one know ho

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)

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://ww

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: 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

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 For

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: 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

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

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.

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

2002-11-11 Thread John Ragan
iginal 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

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

2002-11-11 Thread Greg Matthews
ot; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 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,

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

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 ... i

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

2002-11-11 Thread Arthur Fuller
0:0:02 Arthur -Original 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 perform

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

2002-11-11 Thread Greg Matthews
aid is null Thanks, 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

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

2002-11-11 Thread Dan Rossi
Sent: 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 t

re[2]: MySql 4.1 Sub Selects

2002-11-11 Thread Richard Morton
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

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 http:

RE: MySql 4.1 Sub Selects

2002-11-10 Thread daniel
<[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

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Greg Matthews
-- 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 Matthews wrote: > > >clause) in

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'r

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Greg Matthews
d Fuchs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, November 10, 2002 11:16 PM Subject: Re: MySql 4.1 Sub Selects > In article <014701c288a4$1b1bb550$0100a8c0@dev>, > "Greg Matthews" <[EMAIL PROTECTED]> writes: > > > Your call.

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 l

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Greg Matthews
t; <[EMAIL PROTECTED]> To: "Greg Matthews" <[EMAIL PROTECTED]> Cc: <[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

Re: MySql 4.1 Sub Selects

2002-11-10 Thread Jocelyn Fournier
t yet 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 1

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

Re: MySql 4.1 Sub Selects

2002-11-09 Thread Greg Matthews
is in a semi-usable 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 >

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

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: 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, $comparef

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 John02/1

RE: Sub-selects

2002-06-20 Thread Jon Frisby
, June 20, 2002 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

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

Re: Sub-selects for WHERE clauses

2002-05-28 Thread Geoff Lane
lmain WHERE 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 Cor

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 > oth

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

Re: sub-selects

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

sub-selects

2002-05-02 Thread Alex
i have to use a statement like: SELECT CODICE FROM TABSIC WHERE COM=1 AND SEN=1 AND PRI=1 AND CODICE<>ALL(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-04-23 Thread Bill Easton
WHERE 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 select

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
> -Original Message- > From: 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. > &

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 ++-+---++

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.h

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:

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 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

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 PROTEC

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

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 lis

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://bau

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]'; -

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 maxim

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] > >

Sub-Selects

2001-02-12 Thread Gunnar Ingvi
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] - Before posting

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 t

Re: Sub selects working around

2001-01-16 Thread Bob Hall
Sir, here's a guess in return. The best way to deal with this is to have your client app run a query that counts the rows where packagesParts.pri <> 0. Then run the query below only if the count is greater than 0. Bob Hall >Hi, > >I am guessing this is the kind of problem that would be easier

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 packa

Sub selects working around

2001-01-14 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 packa