Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Can SP return a result set?

$
0
0

Hi there

I'm working on Pervasive -> MS SQL migration project. The current problem is the Pervasive SP (not Function) can return a result set (table). The declaration is as follows:

CREATE PROCEDURE GetEmplPCSum (
 in :EmplID integer,
 in :StDate DateTime,
 in :EndDate DateTime)
RETURNS (EmplID integer,
         "Date" DateTime,
         Regular integer,
         "OT 1" integer,
         "Prem 1" Integer,
         Approved integer,
         Reviewed integer)
AS ....

So far I could not find a way to convert the code above to the MS SQL analogue.

Can MS SQL SP return a table at all? Or only the Function can do it?

Thanks.


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>