Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

outputting similar values as 1 value

Status
Not open for further replies.

drvs

MIS
Jul 19, 2001
8
NL
Hello proggrammers,



I have a table with similar names in it, is it possible to out them as one.

For example :

contract
awbz
awbz (GGZ) OB)DAG
awbz (GGZ) OB)DAG + OB-ALS



I want all the awbz items into a field as only AWBZ
so i can count them as one

Regards


Dennis
 


Hi,

What about GGZ, or DAG, or OB)DAG?

Is it ONLY awbz? If it is, you can use the LIKE operator.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Uhmm

The thare are numbers behind the names

contract
awbz 11
awbz (GGZ) OB)DAG 1
awbz (GGZ) OB)DAG + OB-ALS 11

so i was wondering if i could't make it so that i have one name
awbz 23
 
From your sample data, you only need to delete/ignore every character from the first space to the end of the string. Is this always true?

Do you actually want to update your Contract field or just query/group them together?

Duane
Hook'D on Access
MS Access MVP
 
this ia not always true, sometimes there will be other names like for example Leerwerkplekken DSZW that need to be combined.

Just query/group them together
 
Can you provide a solid, reliable, consistent rule to use that accommodates all possible values in your Contract field?

If you can't provide this, then we can't provide the code.

Duane
Hook'D on Access
MS Access MVP
 
If there is no consistent rule, you can manually group them by creating a separate table.

Name | Group_Name
awbz | awbz
awbz (GGZ) OB)DAG | awbz
awbz (GGZ) OB)DAG + OB-ALS | awbz

You just have to be sure that you're capturing all the names and grouping them.
 
or use hkaing79's table idea, only instead of putting a code for each one, just define the name and then a LIKE expression that will match:

Name Expr
awbz awbz%

then you join to this table on Contract.name LIKE NewTable.Expr and then display/group by NewTable.Name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top