Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / December 2005

Tip: Looking for answers? Try searching our database.

Combining multiple fields into one field (list).

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hcdw29 - 02 Dec 2005 15:39 GMT
I have a table whose records have four fields.  One is an id number and the
other three fields contain a unique number assigned to that id.  I want to
combine all of these assigned numbers into one field so i can make a list of
the assigned numbers.  How do I do this?  
Newbie - 02 Dec 2005 16:35 GMT
Combined:=field1 & field2 & field3

hth
>I have a table whose records have four fields.  One is an id number and the
> other three fields contain a unique number assigned to that id.  I want to
> combine all of these assigned numbers into one field so i can make a list
> of
> the assigned numbers.  How do I do this?
hcdw29 - 02 Dec 2005 19:10 GMT
As suggested: Combined:=field1 & field2 & field3
Resulted in
Number      ID
234            1

Desired result
Number      ID
2                1
3                1
4                1

When 1 is the ID and 2,3,4 are the unique numbers.
Duane Hookom - 02 Dec 2005 19:41 GMT
You could use a normalizing union query:
SELECT ID, FieldA as TheNumber
FROM [a table whose records have four fields]
UNION ALL
SELECT ID, FieldB
FROM [a table whose records have four fields]
UNION ALL
SELECT ID, FieldC
FROM [a table whose records have four fields]
UNION ALL
SELECT ID, FieldD
FROM [a table whose records have four fields];

Signature

Duane Hookom
MS Access MVP

> As suggested: Combined:=field1 & field2 & field3
> Resulted in
[quoted text clipped - 8 lines]
>
> When 1 is the ID and 2,3,4 are the unique numbers.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.