On 3/4/07, Ken Dibble <[EMAIL PROTECTED]> wrote:
> I'm trying to substitute an empty string when a derived field returns None
> (null).
>
>
> Any suggestions would be appreciated. Thanks.
>

You might not like my suggestion ;). If I understand what you're
doing, you're trying to assemble a list of records and the performer
from the Songs and Perfs table where the performer is either a "B"and
or a "P"erson, so you're joining those two tables in. Without trying
to get the syntax exactly right, I think what you want to do is:

Select PersonName as Artist , SongName
   + 'FROM musSongs '  ;
   + 'JOIN musPerfs ON musPerfs.songid = musSongs.pkid '  ;
   + 'JOIN musRecs ON musRecs.perfid = musPerfs.pkid '  ;
   + 'JOIN musPeople ON musPeople.pkid = musPerfs.artid ' ;
    where musSongsType = "P"

UNION

Select BandName as Artist , SongName
   + 'FROM musSongs '  ;
   + 'JOIN musPerfs ON musPerfs.songid = musSongs.pkid '  ;
   + 'JOIN musRecs ON musRecs.perfid = musPerfs.pkid '  ;
   + 'JOIN musBands ON musBands.pkid = musPerfs.artid ' ;
    where musSongsType = "B"

+ 'ORDER BY songname, artist'

-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to