PDA

View Full Version : concatenate one field in an access table



aravindhan_3
06-25-2009, 09:31 PM
Hi,

I need a help on this:
I have a Table Called Payment in access with the following Fields
Ref_No
Doc_No
Amount

Now i want to concatenate all the fields, its really easy to do this in an access query. But I need this in a table itself with another filed added
eg:
Ref_No
Doc_No
Amount
Concanated

i should see all the values of Ref_No, Doc_No and Amount should be concanated

is this possible?

Arvind

OBP
06-26-2009, 03:44 AM
Arvind, yes it is, but why in "Another table"?
Or do you mean you want to add another field to the current Table?
Create your select query with the Concatenation Column and then Change the Query to an Append Query and append the
Ref_No
Doc_No
Amount
Concanated
to your new empty table.
If however you just want to add a field to the current table, add the Field and then create a query based on just the new field.
Change it to an Update Query and then in the "Update To" row enter the same concatenation that you would have used in the Column Heading of the other query.

CreganTur
06-26-2009, 01:13 PM
I, too, question your reason for doing this. Why do you need to concatenate all of this together, when you already have it available in separate fields? You're storing the same information twice, which is a big relational database no-no.

OBP
06-27-2009, 03:17 AM
Randy, I have done this in the past to create a totally unique identification field. But if the original Table has Duplicates you can't set the Unique field to "No Duplicates" and have to set up an Identical Table structure with the NO Duplicates set and then transfer the data to it to remove the duplicates.
Maybe the OP is trying to do something similar?

aravindhan_3
06-28-2009, 09:28 AM
Hi,

Thanks for your replies,

The reason i contacanate the fields to get the unique values from a table, coz there are N number of duplicate entries, If i contacanate the fileds i will definetly get uniques values for all the three columns.

i will do the same for 2 tables then i will create a query to match both the tables with the help of contacanated fields.

cheers
Arvind