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

question re composing strings 2

Status
Not open for further replies.

teach314

Technical User
Jul 29, 2011
183
CA
Greetings - I have a normalized table that looks like this.
ID and Indx are Long, and Code is Text. Each ID has Indx values in increasing order.
In my actual table there are 8 to 15 records for each ID.


Code:
ID      Indx      Code
1        2        X
1        5        Y
1       11        Q
1       12        4

2        5        D
2        6        3

3        1        W
3        3        B
3        7        1
3        8        8

4        1        R

5        1       etc

I need to populate a new table that generates a SERIAL NUMBER for each ID. For the above table, the results would be as shown below.

Code:
ID       SerialNumber
1         XYQ4
2         D3
3         WB18     
4         R
5   etc

I'm thinking VBA may be needed, but I'm even less confident with that that SQL. Thank you for any ideas.
Teach314

 
Thanks to both strongm and Duane for responding. The two references given are similar, but still quite different. As a learning exercise I used both and found them to be fast and readily adaptable to a variety of situations that involve concatenation. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top