> Is there a way to concatenate two fields in access when one of them are
> blank?
>
> Select Title + ' '+ subtitle as fulltitle
> from table
>
> Fulltitle is blank when ether field is blank.
>
> Does any one know if this works in SQL server 7.

Is SQL server adding a NULL field to anything turns the entire statement to
NULL

Use the IsNull function to get around this:

SELECT LTrim(Rtrim(IsNull(Title, ' ') + ' ' + IsNull(Subtitle, ' '))) AS
fulltitle
FROM table

This should return the recordset you're looking for.

Hatton
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to