> AND ProductGroupID = CASE WHEN @productgroupid > 0 THEN > @productgroupid ELSE ProductGroupID END
This is the simplest to read but has a drawback, it the stored ProductGroupID is null then the statement becomes AND ProductGroupID = ProductGroupID and for some reason NULL does not equal NULL so the row isn't returned, is there a workaround for this? -- Jay ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280967 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

