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; --> What this exactly do ? Select patid, patname, replace(replace(substr(multiset (select item allergy from allergy where allergy.patid = patient.patid)::lvarchar,11),"'",""),"}","") from ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| What this exactly do ? Select patid, patname, replace(replace(substr(multiset (select item allergy from allergy where allergy.patid = patient.patid)::lvarchar,11),"'",""),"}","") from patient ; substr from a multiset ? J. bozon escribis: > 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 |
| ||||
| Jean Sagi писал(а): > What this exactly do ? > > Select patid, patname, > replace(replace(substr(multiset (select item allergy from allergy where > allergy.patid = > patient.patid)::lvarchar,11),"'",""),"}","") > from patient ; > > substr from a multiset ? > substr from lvarchar |