[mythtv] Joining on a calculated column

David Engel gigem at comcast.net
Mon Jan 10 21:52:48 EST 2005


On Mon, Jan 10, 2005 at 09:25:53PM -0500, mythtv at donoghue.org wrote:
> Use the calculation instead of the column alias in your JOIN clause:

Thanks to you and Jeremiah Morris for the quick response.
Unfortunately, the real calculation spans several lines, and needs to
used in two JOINs besides being retrieved in the results.  Does that
mean I'll have to replicate the calculation in all three places?

Is there any way to define the calculation as a function once and
re-use it?  I've seen references to user defined functions and stored
functions, but I'd like to keep this usable with MySQL 3.x and without
custom shared libraries.

David
-- 
David Engel
gigem at comcast.net


More information about the mythtv-dev mailing list