I hit a snag trying to convert a cold fusion query into a stored procedure...
I am using SQL server 7.0..

I want to use a correlated subquery to insert a list of values into a 
single field. With coldfusion, I use valuelist to convert the subquery into 
1 entity that I can insert..  is there a sql server function to do the same?

Here is what I have so far (unrelated fields removed for clarity)

====================================
insert into trialsdisplay
(tumors)
(select tumordescr from tumordetl,tumortype
where (tumordetl.trnum = trials.trnum)
and (tumordetl.tumorid = tumortype.tumorid))

...
from trials, contdetl, contacts
where (contdetl.trnum = trials.trnum) and (contdetl.conid = contacts.conid 
) and (trials.approved = 'Y')
================================================

   This works if there is 1 tumor type.  I need some way to take 
the  results of the select and convert it to a list. Any ideas?
  As an added bonus, it would be nice if the list was delimited with "<br>" 
instead of "," :)

thanks
Al Musella, DPM
Musella Foundation


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to