Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Merge two fields into one filed?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

tomasalsbro
Average Member

Sweden
818 Posts

Posted - 30 September 2004 :  18:43:02  Show Profile  Visit tomasalsbro's Homepage
Hi,
In a Access table I have two fields that I need two merge into one singel field.

The fields are text fields as follow:
1 - First name
2 - Surname

How do I do to make this a singel field contaning both first- and surname?

The total number of items are about 400.

Cheers
Tomas

!-Keep distance in traffic-!
www.whiplashinfo.se

Edited by - ruirib on 30 September 2004 18:44:11

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 30 September 2004 :  18:46:31  Show Profile  Send ruirib a Yahoo! Message
What are the table and field names?


Snitz 3.4 Readme | Like the support? Support Snitz too

Edited by - ruirib on 30 September 2004 18:47:28
Go to Top of Page

pweighill
Junior Member

United Kingdom
453 Posts

Posted - 30 September 2004 :  18:57:50  Show Profile
Add a fullname column to the table, then run an update statement.

e.g.

UPDATE table SET fullname = firstname + ' ' + surname
Go to Top of Page

tomasalsbro
Average Member

Sweden
818 Posts

Posted - 01 October 2004 :  00:18:46  Show Profile  Visit tomasalsbro's Homepage
quote:
Originally posted by ruirib

What are the table and field names?



The table name is "List
The fields name are: "Name_First" and "Name_Last"

Tomas

!-Keep distance in traffic-!
www.whiplashinfo.se
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 01 October 2004 :  05:23:52  Show Profile  Send pdrg a Yahoo! Message
Thomas, as above but with your fieldnames:

UPDATE [list] SET fullname = [Name_First] + ' ' + [Name_Last]

Keep the original first and surnames in the table, do not overwrite them, in case you ever need to get back to the base source data (imho) it is easier to re-merge them than to split them apart :)

ALTERNATIVELY - do not merge at all (I hate making clean data dirty), and change your select to:

SELECT [Name_First] + ' ' + [Name_Last] as [Name_Full]
from [list]
where <whatever>
order by <whatever>
Go to Top of Page

tomasalsbro
Average Member

Sweden
818 Posts

Posted - 01 October 2004 :  07:00:55  Show Profile  Visit tomasalsbro's Homepage
OK - I succeded.
Thanks!

Tomas

!-Keep distance in traffic-!
www.whiplashinfo.se

Edited by - tomasalsbro on 01 October 2004 18:01:27
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 2.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07