Subject RE: [firebird-support] Go ahead and laugh, SQL gurus
Author Graeme Edwards
_____

<< Left outer joins would fix this.>>

I tried that, but they take "forever" (and a day)--in fact, even adding ONE
left join solidifies the statement into a petrified quagmire of
battle-hardened, world-weary Mega-molasses.

<<If the Excellent and Good replies are effectively hard-coded and don't
need to change you could do it more simply with a case statement>>

Inside a SQL statement?
Yes, it makes a rather lengthy SQL statement however.

I notice that you were showing the data in a grid. You could use an
ongettext event like
below and apply the same event to every field that is required to be shown
like this.
The assumption is that the data is for display, not for editing if you do it
this way.

if (Sender.IsNull) then
Text:='No Reply'
else if Sender.AsInteger=1 then
Text:='Excellent'
else if Sender.AsText=2 then
Text:='Good';

or alternatively create a query which links to the Excellent, good table and
make
each of the fields a lookup field, pointing to this query. This would make
the data
editable within the grid with a dropdown list if handled correctly

Clay Shannon,
Dimension 4 Software



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




_____

YAHOO! GROUPS LINKS



* Visit your group "firebird-support
<http://groups.yahoo.com/group/firebird-support> " on the web.


* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>


* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .


_____




[Non-text portions of this message have been removed]