[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Small select question...


You'll have to be more specific in your example -- your select statement
below is rather ambiguous.

However, take a look at the CASE WHEN...THEN functions that MySQL offers.
I'm sure it's exactly what you are looking for.


----- Original Message -----
From: "Bryan Coon" <bcoon@xxxxxxxxxxxx>
To: <mysql@xxxxxxxxxxxxxxx>
Sent: Tuesday, March 20, 2001 1:30 PM
Subject: Small select question...


> Hopefully this is not too lame a question...
>
> In oracle, I can do this:
>
> select a, b, c from A, B, C where a = A.a (+) and b = B.b (+) and c = C.c;
>
> What is the equivalent in MySQL?  The (+) allows that 'where' statement to
> be kind of optional (I think). Basically I want to do a select on multiple
> tables and if one of the 'where' statements doesn't match anything, the
> query still returns values for other statements that did (e.g. if a = A.a
is
> not true, but b = B.b is, I want to return B.b).
>
> Thanks!
>
> ---------------------------------------------------------------------
> 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 <mysql-thread68897@xxxxxxxxxxxxxxx>
> To unsubscribe, e-mail
<mysql-unsubscribe-jason=appliediq.com@xxxxxxxxxxxxxxx>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
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 <mysql-thread68901@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



This mailing list archive is a service of Copilot Consulting.