Unix Technical Forum

RE: Sql to concatenate multiple rows to a single row / column

This is a discussion on RE: Sql to concatenate multiple rows to a single row / column within the Informix forums, part of the Database Server Software category; --> Ok, I'm too curious. Does multiset work in IDS7.2? Rob -----Original Message----- From: owner-informix-list@iiug.org [mailto wner-informix-list@iiug.org] On Behalf Of ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 09:36 AM
Konikoff, Rob \(Contractor\)
 
Posts: n/a
Default RE: Sql to concatenate multiple rows to a single row / column


Ok, I'm too curious. Does multiset work in IDS7.2?

Rob
-----Original Message-----
From: owner-informix-list@iiug.org [mailtowner-informix-list@iiug.org]
On Behalf Of bozon
Sent: Wednesday, November 16, 2005 10:55 AM
To: informix-list@iiug.org
Subject: Re: Sql to concatenate multiple rows to a single row / column

Very cool. I was doing it the old fangled way. Nice to know that I can
always learn something.

8.5 is the Extended Parallel Server which is great for data warehouses
but hasn't really caught on.

One quick note since you know that the string "MULTISET{" occurs at the
begining of the lvarchar there is no sense in searching the whole
multiset for it you can just use the substr function to remove it. (It
could also be wrong because one of your patients could be allergic to
"MULTISET{" ;-) )

Select patid, patname,
replace(replace(substr(multiset (select item allergy from allergy where
allergy.patid =
patient.patid)::lvarchar,11),"'",""),"}","")
from patient ;
sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com