Thanks Guys!  I guess I should have noted that I'm using SQL server.  I really liked 
the idea of your first solution, Rudy (NULLS LAST), but it isn't supported in MS SQL 
Server.  Right now I'm leaning toward either splitting it into multiple SQL statements 
or using the sort option to put the nulls last as Rudy suggested, but am not sure how 
to go about this.  I'd appreciate a point at a tutorial or a concrete example.
  My knowlege of SQL is kinda limited and I've been introduced to some new ideas so 
thanks to everyone.
-Stephen
http://www.mechavox.com

On Tuesday, July 22, 2003 6:54 AM, rudy commented:

:: "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]

Reply via email to