Thursday, 15 January 2015

sql - how to find if incomming parameter in not null and not empty in Sybase -


I'm trying to write something like this in CBS ASE

  @searchstring Varchar (500) If the best way to check this condition is INULLorEpty for the incoming @ parameter (ANNLLERTE (@sizerstring)) {exec (@strexecsql)} and {exec (@ strexecsql1)}  < 
 

"post-text" itemprop = "text">

Best would be ISNULL, that is:

  DECLARE @ SearchString varchar (500 ) ... if (ISNULL (@searchstring, '') = '') EXEC (@strexecsql) ELSE EXEC (@ strexecsql1)  

No comments:

Post a Comment