Sql Multiple Where Clauses on Same field -


i have several queries in ms access database rewriting in sql stored procedure. queries have several filters applied same field.

select * dt.sm_t_ocdetails      (rest1 <> 's' or rest1 null)     , (rest2 <> 's' or rest2 null)      , (rest3 <> 's' or rest3 null)     , (rest4 <> 's' or rest4 null) 

is there better way write

(rest1 <> 's' or rest1 null) 

part of queries? looked @ coalesce unless doing wrong, don't think works.

thanks

using coalesce:

coalesce(rest1,'not-s') <> 's' 

though think original clearer.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -