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

On a query, how do I display a list of addresses horizontally?

Status
Not open for further replies.

SCantoria

Programmer
Sep 23, 2005
100
US
We export our reports into excel format. The issue is, when an office or entity have more than one service address, this information normally displays vertically. This time, I need to display or list these addresses horizotally.

Thanks,

Steve C.
 
How about:

How to concatenate multiple child records into a single value
faq701-4233
 
I really do not need to concatenate the values to a single field.

Here is a sample of what I need to do. Report must export in Excel.

Dr White works in ACME Hospital, ABC Hospital, and City Hospital.

I need the report to read starting from column A
Doctor Name Hospital 1 Hospital 2 Hospital 3
Dr White ACME ABC City

I am not sure if this is even possible.

Thanks,

Steve C.
 
A crosstab query may suit. For example:

[tt]TRANSFORM First(tblT.Hosp) AS FirstOfHosp
SELECT tblT.Doc
FROM tblT
GROUP BY tblT.Doc
PIVOT tblT.Hosp;[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top