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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you merge two fields to create a third?

Status
Not open for further replies.

HMJ

Technical User
Nov 29, 2002
58
US
I have a unique situation here. A customer is assigned a "customer id" (i.e. HELP13579) which stays with this customer until the end of time.

When a situation arrises, the customer is assigned an additional letter or number which is the "sequence id" (i.e. W).

This then creates a "situation id" of HELP13579W that is used for tracking. Unfortunately, we currently enter this "situation id" by hand, and fingers don't always go where they should.

Is there a way of merging the "customer id" and the "sequence id" to automatically create the "situation id, in the table?

If I used it only on a form, it would be easy, but this id also needs to be in a table for reference elsewhere.

Thank You.


Harry Jessen
HMJessen@Yahoo.com
 
Harry,

If both
Code:
customer id
and
Code:
sequence id
are in the database you shouldn't store the concatenated string as well as you can create it any time! For example you can use this query:
Code:
select 
    ([customer Id] & [sequence Id]) as situationId 
from
    [myTable]
If you insist in storing it you could do the same way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top