Ok, So when I put my WHERE clause, just before GROUP BY, it gets an error...

What was SELECT 1 all about, I've never seen that before...

Trying to tweak!
Yoda man still!







On 04/12/06, r937 <[EMAIL PROTECTED]> wrote:
> I tried to adda  region filter, which is in a table jsut liek the
> option select..

no, sorry

asset-to-assetPropertyOption is one-to-many

if you add another join to the query with a ~different~ one-to-many
relationship, you will end up with cross join effects (each of three regions
will join with each of 3 options, giving 9 result rows for the GROUP BY)

i would do it with an EXISTS subquery

  select ...
    from ...
   where exists
         ( select 1
             from assetregion
            where assetId = asset.id
              and regionId IN ( 1, 2, 3 )  )


by the way, you've messed up the max version logic again

this is wrong --

>SELECT asset.id, asset.naturalName, assetVersion.fileName,
> assetVersion.fileNameThumb, assetVersion.dateCreated,
> assetVersion.size, asset.assetVersionId, MAX(
> assetVersion.versionNumber )
> FROM ...

use the subquery in the join as shown in the previous query


____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.


____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to $subst('List.Name') as: 
$subst('Recip.EmailAddr')
To unsubscribe send a blank email to $subst('Email.UnSub')
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to