> "select id, fname + space(1)+isnull(lname,'') as fullname from tablename > where lname is not null > union all > select id, fname + space(1)+isnull(lname,'') as fullname from tablename > where lname is null"
hi elan i think i know where you're going with that, but you would have to do something else (union of 4 selects?) because not only lname can go null, fname can too and where's the ORDER BY? the whole problem is that the result has to be sorted in a particular way, so there must be an ORDER BY ;o) ____ • The WDVL Discussion List from WDVL.COM • ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]