Concatenate Sub Query?

J

JohnR

Is it possible to run a subquery that has multiple records and concatenate
them into a single string for use in athe main query?

I have an order with multiple order details. I want to build a string out
of the multiple details to include them as a single field in my main query.
Can it be done? And if yes, How?

Thank you in advance for your assistance.

John
 
M

Micah Chaney

Yes -- And it is so useful for other things.
Say you have a [Field A] with value "Mr." a [Field B] with value "Michael"
and a [Field C] with value "Jones"...
You would create a separate field like this:

Name: [Field A]&" "&[Field B]&" "&[Field C]

This will yield: Mr. Michael Jones

The "&" concatenates fields and text surrounded by "".

You don't need to do this in a sub query either...Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top