Re: Create Table?
- From: "DFS" <nospam@xxxxxxxx>
- Date: Wed, 12 Jul 2006 02:09:11 -0400
Lyle Fairfield wrote:
DFS wrote:
GCM wrote:
Hi,
I have a table that has the following fields; LName, FName and
MName. Also there are other fields in the table. I need to create
another table with those fields combined as "Trim([LName] & " " &
[FName] & " " & [MName]). How can I create this table?
Thanks in advance...
GCM
SELECT (Trim(LName) & ' ' & Trim(FName) & ' ' & Trim(MName)) AS
FullName INTO NewTable
FROM ExistingTable
WHERE ...
Years ago SELECT (Trim(LName) & ' ' & Trim(FName) & ' ' & Trim(MName))
might result in two spaces in some cases where a field was null or
held a zero length string.
If someone didn't have a first name...
I don't know if that is the case anymore
but a solution has been discussed many times here as in:
http://groups.google.ca/group/comp.databases.ms-access/msg/a807ea4bc514ad10
where Arvin writes:
"Try:
=[Street1] & (", " + [Street2]) & (", " + [Town]) & (", " + [County])
& (",
" + [PostCode])
The "+" operator will not concatenate with a null, while the "&"
will."
I did not know that. Thanks.
Regardless, I am with Keith in wondering if creatig this table is
REALLY necessaryfor the original poster as the first part of your
query gives all that the new table gives.
There can be any number of scenarios where he needs a discrete table of full
names. Mine is not to question why...
.
- References:
- Create Table?
- From: GCM
- Re: Create Table?
- From: DFS
- Re: Create Table?
- From: Lyle Fairfield
- Create Table?
- Prev by Date: Re: Create Table?
- Next by Date: Re: How do I get min max from 100 cuts in one record?
- Previous by thread: Re: Create Table?
- Next by thread: Monday --> Sunday
- Index(es):
Relevant Pages
|