Sunday, March 22, 2009

COALESCE With Like Sql-server

using COALESCE With Like in Sql-server
 
SELECT
* FROM PHONEMEMO WHERE phto like '%' + COALESCE(@phto, phto)+'%'
and
phfrom like '%' + COALESCE(@phfrom, phfrom)+'%'
 

No comments: