What is wrong with this statement
case when NOT IsNull(firstID) then
(select isnull(username,'not used') from tbl_login
end
I only what to return when is the value of firstID is not Null or empty
Thanks
--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
I noticed that as soon as I posted the message, I also forgot to mention
that this is in stored procedure, what can I use to evaluate a value? I also
tried IIF?
Thanks
"Erland Sommarskog" <esq...@sommarskog.se> wrote in message
news:Xns9CBEECE99...@127.0.0.1...
SELECT <columns> FROM tbl WHERE
firstID IS NOT NULL OR firstID =''
"Excel User" <eu...@microsoft.com> wrote in message
news:ebTBOFZY...@TK2MSFTNGP06.phx.gbl...
But this is in a stored procedure, not sure what to use here.
Thanks
"Uri Dimant" <ur...@iscar.co.il> wrote in message
news:#RbicKdY...@TK2MSFTNGP02.phx.gbl...
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Excel User" <eu...@microsoft.com> wrote in message
news:us4oFuhY...@TK2MSFTNGP04.phx.gbl...