Select Expression Operators
From: Gary K (GaryK_at_discussions.microsoft.com)
Date: 08/31/04
- Previous message: David Dvorak: "605 and 823 errors"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 30 Aug 2004 22:49:06 -0700
Sorry for what must seem like a dumb question, but I was wondering why I keep
getting "<operator> not recognized" errors when I try to use the following
sql clause:
SELECT personid, IIF(LEN(ISNULL(middlename, '')) = 0, firstname + ' ' +
lastname, firstname + ' ' + middlename + ' ' + lastname) AS FullName FROM
mydatabase
Regardless of which operator I use (=, <, >, etc..) it is unrecognized when
the statement gets compiled. All I want to do is use the sql query to
concatenate the name strings to a full name without having extra spaces in
the middle when there is no middle name specified. I was able to use this
query with MS Access but I am having trouble porting it to SQL server. (Mind
you, in access I was able to use ISNULL by itself, not just checking for zero
length strings) Can someone please point out my error?
- Previous message: David Dvorak: "605 and 823 errors"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|