I don't have any idea about your second question but I have a thought on the
first one.
In DB2, which I use most of the time, you don't need to qualify a column
name like list_ID or acct_ID unless it is ambiguous. In this case, neither
one is ambiguous because both get used in single-table SELECT
* 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 how to do this?
> I need somet
[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
# [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./~eagl
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 version
// 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
, 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
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 an external program, or does it have to be SQL
only?
Gurhan
- Original Me
On 28 May 2002, 14:20, Benjamin Pflugmann wrote:
> That's an FAQ and explained in the tutorial:
> http://www.mysql.com/doc/e/x/example-Maximum-row.html
~~~
Thanks for the link, which I've bookmarked. Thanks also to those
that responded off-list.
Unfortunately, the approach given in the tutorial
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 us
"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
Try the following:
SELECT leads.* FROM leads
LEFT JOIN blacklist ON leads.refnumberid = blacklist.leadid
WHERE blacklist.leadid IS NULL
AND ...
The LEFT JOIN will give you a row for every row in leads; blacklist columns
will be null if there's no matching blacklist, so the WHERE clause
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
~
Rob
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: --
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 che
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
> 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]';
-
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.
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
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
20 matches
Mail list logo