Yup it's as simple as that....but the one thing to bear in mind is that the results of any select statement in your SP (other than those setting values of variables) will be considered as returnable resultsets
------------------------------------------------------------------ Andrew Ewings Project Manager Thoughtbubble Ltd http://www.thoughtbubble.net ------------------------------------------------------------------ United Kingdom http://www.thoughtbubble.co.uk/ Tel: +44 (0) 20 7387 8890 ------------------------------------------------------------------ New Zealand http://www.thoughtbubble.co.nz/ Tel: +64 (0) 9 488 9131 ------------------------------------------------------------------ The information in this email and in any attachments is confidential and intended solely for the attention and use of the named addressee(s). Any views or opinions presented are solely those of the author and do not necessarily represent those of Thoughtbubble. This information may be subject to legal, professional or other privilege and further distribution of it is strictly prohibited without our authority. If you are not the intended recipient, you are not authorised to disclose, copy, distribute, or retain this message. Please notify us on +44 (0)207 387 8890. -----Original Message----- From: Jared Stark [mailto:[EMAIL PROTECTED]] Sent: 04 October 2001 16:36 To: CF-Talk Subject: Re: Stored Procedure Question > <cfstoredproc procedure="procedure_name" datasource="#maindsn#"> > <cfprocresult name="result1"> > <cfprocresult name="result2"> > </cfstoredproc> The only difference is you need to add the RESULTSET attribute, like this... <cfprocresult name="result1" resultset="1"> <cfprocresult name="result2" resultset="2"> The RESULTSET attribute is what determines where the results go. They simply go in order of where they are placed in your stored procedure, so if you have Select * from people Select * from animals The results from the people table would be in result1, and the results from the animal table would be in result2. Pretty slick, eh? JS ----- Original Message ----- From: "Mark Stewart" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, October 04, 2001 8:17 AM Subject: Stored Procedure Question > All, > > I've been using stored procedures for a while now but I've never really > needed to create one that returned multiple result sets. My question is, > how do you do that? Would someone be kind enough to show me a little > pseudo code or a snippet of code on how to accomplish this? > > I assume in cf, I would build my cfstoredproc like this: > > <cfstoredproc procedure="procedure_name" datasource="#maindsn#"> > <cfprocresult name="result1"> > <cfprocresult name="result2"> > </cfstoredproc> > > But I draw a blank when it comes to building the stored proc in SQL > Server where it would return multiple results. I assume the following: > > create procedure [procedure] as > > select ... from ... where... > > select ... from... where... > > How do I specify what query goes with what result? > > Thanks for your help! > > Mark > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists