Andy Ousterhout wrote: > Here is the proc that I am using. You suggest either 2 separate queries or > 2 procs?
> WHERE ((@InvoiceNumber IS NOT NULL) AND (tabInvoices.InvoiceNumber > [EMAIL PROTECTED])) > OR ((@PeachtreeKEY IS NOT NULL) AND (@PeachtreeInvoice IS > NOT NULL) > AND (tabInvoices.PeachtreeInvoiceNumber= > @PeachtreeInvoice) > AND (tabCustomers.Peachtree_FK= @PeachtreeKey)) Use 2 separate queries (in 1 or 2 procedures). Why are you using a stored procedure? This appears to be a simple SELECT that would be equally good with cfqueryparam. If there are no urgent pattern / encapsulation reasons I would probably just use 2 queries in the CF code. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware: a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191307 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54