On Wednesday 24 March 2004 16:33, Mike Nolan wrote: > > Is there any way to treat it like an inline function so that I could write > something like the following (highly simplified):
I think 7.4 will inline simple SQL functions. Your CASE looks like a good candidate. > select case when A=1 then 1 when B=1 then 2 else null end > as mailtype, memname from master > where mailtype is not null; -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend