Re: concatenating fields in an SQL query
From: Sunil Furtado (sunil_at_furtado.de)
Date: 02/18/05
- Next message: John: "Re: change error message"
- Previous message: Alan: "Re: Any way to keep TADOStoredProc parameters"
- In reply to: Willy Verbiest: "concatenating fields in an SQL query"
- Next in thread: Willy Verbiest: "Re: concatenating fields in an SQL query"
- Reply: Willy Verbiest: "Re: concatenating fields in an SQL query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 18 Feb 2005 12:19:01 +0530
SELECT
tblContacts.*,
iif(isnull(tblContacts.FirstName,' ',tblContacts.FirstName) )+ ' ' + etc
Sunil
----- Original Message -----
> I'm trying to concatenate 3 fields: FirstName + MiddleName + LastName to
> get a nieuw field ContactName to select in dropdownbox.
> If one of the 3 fields is empty i get an empty ContactName string back.
> Here is the SQL
>
> SELECT
> tblContacts.*,
> tblContacts.FirstName + ' ' +
> tblContacts.MiddleName + ' ' +
> tblContacts.LastName as ContactName
> FROM tblContacts
> WHERE tblContacts.CustomerID = :CustomerID
> ORDER BY LastName, FirstName
- Next message: John: "Re: change error message"
- Previous message: Alan: "Re: Any way to keep TADOStoredProc parameters"
- In reply to: Willy Verbiest: "concatenating fields in an SQL query"
- Next in thread: Willy Verbiest: "Re: concatenating fields in an SQL query"
- Reply: Willy Verbiest: "Re: concatenating fields in an SQL query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|