X-Received: by 10.236.69.35 with SMTP id m23mr517720yhd.6.1394683262461; Wed, 12 Mar 2014 21:01:02 -0700 (PDT) X-Received: by 10.140.82.213 with SMTP id h79mr5948qgd.20.1394683262444; Wed, 12 Mar 2014 21:01:02 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!w5no3990939qac.0!news-out.google.com!bw18ni3075qab.1!nntp.google.com!hw13no3963043qab.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.databases.ms-sqlserver Date: Wed, 12 Mar 2014 21:01:01 -0700 (PDT) In-Reply-To: <88badd6b-44dc-44ed-81c0-a423f3053ab6@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.61.139.203; posting-account=SOVadwoAAAB3h7W1MLW9kMYtEc2JW2L8 NNTP-Posting-Host: 173.61.139.203 References: <88badd6b-44dc-44ed-81c0-a423f3053ab6@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: help with output parameters needed From: Ross Presser Injection-Date: Thu, 13 Mar 2014 04:01:02 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.databases.ms-sqlserver:1728 On Wednesday, March 12, 2014 11:41:41 PM UTC-4, migurus wrote: > My difficulty is that SP can return output parameters, but it seems I can= 't call SP in select? The UDF can be called from select but can not return = more than one value and I need to return at least two, in fact 4 values, I = just simplified everything. UDFs can return TABLE variables, which would let you return more than one v= alue, but that doesn't really help -- you still can't run it on a table inp= ut and get a table output. Your best bet is to have RUN() be a stored proc= edure that operates on an entire table of input and returns a resultset wit= h output for all rows.