RobHVB6Sql
Programmer
I have been struggling with this one for some time.
Several reports use this and I want to return the title (an integer field) where possible, but return a space for those with a 0 value.
Can anyone come up with code that acts like ISZERO? much like ISNULL?
Desired results would be:
SMITH, Joe Mr
SMITH, Jennie
(Second row here has a title set to 0).
Rob Hasard
(VB6 /SQL 7.0)
Several reports use this and I want to return the title (an integer field) where possible, but return a space for those with a 0 value.
Can anyone come up with code that acts like ISZERO? much like ISNULL?
Code:
SELECT
'Client' = p.Surname + ', ' + p.Firstname + ISZERO(p.Title, '')
FROM tblPerson p
Desired results would be:
SMITH, Joe Mr
SMITH, Jennie
(Second row here has a title set to 0).
Rob Hasard
(VB6 /SQL 7.0)