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!

output multiple records as one

Status
Not open for further replies.

cromulent

Programmer
Oct 8, 2004
8
US
How do I output a multiple record single column as a single record single column delimited by whatever I want?

Thanks

website:
 
You may consider a stored procedure dealing with a cursor.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I have not done cursors before so I will figure it out and tell you how it goes. If you have some quick pointers, I could use them as well.

Thanks

website:
 
After doing some research, I dont think cursors are what I need. I want to be able to get these values in a sub select statement. Here is my code that doesnt quite work (part needing help shown by an *):

Select po_vendors.VENDOR_ID, po_vendors.VENDOR_NAME,
po_vendor_sites_all.VENDOR_SITE_ID,
(po_vendor_sites_all.ADDRESS_LINE1 || '~' || po_vendor_sites_all.ADDRESS_LINE2 || '~' ||
po_vendor_sites_all.ADDRESS_LINE3 || '~' || po_vendor_sites_all.ADDRESS_LINE4) as address,
po_vendor_sites_all.CITY, po_vendor_sites_all.STATE,
po_vendor_sites_all.ZIP, po_vendor_sites_all.COUNTRY,
(po_vendor_sites_all.FAX_AREA_CODE || po_vendor_sites_all.FAX) as fax,
* (select unique po_vendor_contacts.VENDOR_SITE_ID
* from po_vendor_contacts
* where po_vendor_contacts.VENDOR_SITE_ID = po_vendor_sites_all.VENDOR_SITE_ID) as contacts
from po_vendors, po_vendor_sites_all where po_vendors.VENDOR_ID = po_vendor_sites_all.VENDOR_ID
order by vendor_id

website:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top