Group By String concatenation

  • Thread starter Thread starter Daniele
  • Start date Start date
D

Daniele

I have a question...
I'm doing a "group by" query... the table is like this:

ID CODE
1 A10
2 A10
3 AVC
4 RTS5
5 AVC

I'm trying to obtain something like this:

ID CODE
1 - 2 A10
3 AVC
4 - 5 RTS5

I need to call this query not from access, but by an external
application: I can't use VBA...

Thanks and sorry for my english!
 
I don't understand your logic. ID 5 has a code of AVC. Why would 4-5 be RTS5
in you desired output?

Also, do you need to display only the min and max ID or do you want all ID
values for each CODE?

It may be easiest to write code in your "external application".
 
I don't understand your logic. ID 5 has a code of AVC. Why would 4-5 be RTS5
in you desired output?

mmm... i'm an idiot!
it must be:

ID CODE
1-2 A10
3-5 AVC
4 RTS5
Also, do you need to display only the min and max ID or do you want all ID
values for each CODE?

I need all ID values
It may be easiest to write code in your "external application".
If I can't do it with a query, I will try to write an application to
do this.

Thanks!
 
I think you can use an update query to another joined table where the
multiple ID field is updated to the multiple ID field & the ID Field.
 
Back
Top