You can use LEN() function as I showed in other thread.
... AND LEN(catcode) > 0
Also you should use single quotes for string literals in MS SQL Server. The " (double quote) can only be used as string literal delimiter when SET QUOTED_IDENTIFIER OFF, which is not default setting.
>
>I have the following statement this statement is part of S.P. :
>
>SET @L_SQLCMD='DECLARE TMPRecord CURSOR STATIC FOR '+
>'select TOP 1 CATCODE From IMS.CATEGORY WHERE YEAR = 2007 and catcode <> ""'
>
>exec @L_SQLCMD
>
>The ms sql not accept the "" for !empty value is there a way to work around
--sb--