Hi,
Here's something that i've been working on for a while, and that i might know how to do in ASP, but in Access it's stumping me.
I'm trying to link up a part number prefix and part code database. they are heirarchical, so there are many Part Num Prefixes for each code, etc
example:
Table Name: All_parts (1.6 million records)
Part_Code | Part_Prefix | Part_Base
1 | BUH | 133
1 | BUH | 155
1 | BX | 317
2 | QRT | 185
2 | PFT | 546
2 | PFT | 985
3 | FRH | 346
3 | ETG | 354
now, what im trying to do is for each DISTINCT part code, go through and grab all DISTINCT prefixes within that.
the problem is that it is a double distinct combine.
i need the distinct codes, and within that set, i need the distinct prefixes. I need to then concatenate each of the prefixes (separated by commas) into a memo field in a different table.
essentially how to get from the above example to:
Table Name: Code_Prefix_Join (~150 records)
Part_Code | Part_Prefix_Join
1 | BUH,BX
2 | QRT,PFT
3 | FRH,ETG
the reason this needs to be done dynamically and can't just be given to a data-entry guy to figure out once is that the part codes and prefix relationships change often, and the part_prefix_join field needs to be used in a later search.
i've thought about running a distinct sql query on just the part codes, dumping them into an array and running through them looking for distinct prefixes. there are hundreds of part codes though, and i think that would just be massively inefficient. besides, i dunno how to go about that in access.
thanks for the help guys, you're awesome. if you have any questions or need any clarification please let me know.
thanks!
Here's something that i've been working on for a while, and that i might know how to do in ASP, but in Access it's stumping me.
I'm trying to link up a part number prefix and part code database. they are heirarchical, so there are many Part Num Prefixes for each code, etc
example:
Table Name: All_parts (1.6 million records)
Part_Code | Part_Prefix | Part_Base
1 | BUH | 133
1 | BUH | 155
1 | BX | 317
2 | QRT | 185
2 | PFT | 546
2 | PFT | 985
3 | FRH | 346
3 | ETG | 354
now, what im trying to do is for each DISTINCT part code, go through and grab all DISTINCT prefixes within that.
the problem is that it is a double distinct combine.
i need the distinct codes, and within that set, i need the distinct prefixes. I need to then concatenate each of the prefixes (separated by commas) into a memo field in a different table.
essentially how to get from the above example to:
Table Name: Code_Prefix_Join (~150 records)
Part_Code | Part_Prefix_Join
1 | BUH,BX
2 | QRT,PFT
3 | FRH,ETG
the reason this needs to be done dynamically and can't just be given to a data-entry guy to figure out once is that the part codes and prefix relationships change often, and the part_prefix_join field needs to be used in a later search.
i've thought about running a distinct sql query on just the part codes, dumping them into an array and running through them looking for distinct prefixes. there are hundreds of part codes though, and i think that would just be massively inefficient. besides, i dunno how to go about that in access.
thanks for the help guys, you're awesome. if you have any questions or need any clarification please let me know.
thanks!