Subject Re: [firebird-support] conditional selects in a SP
Author Martijn Tonies
> I haven' tried this, but can't you just write
>
> where (H.Haul_Code=:supphaul or :supphaul is null)
> and A.code=H.haul_code
>
> and then just pass NULL to :supphaul if you want all records?

Markus, this is the "usual workaround", but has the plan problems
I described earlier.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com