Hello everyone,

does it gives the same result if i use oracle and sql stored proc. somehow im not same output for both though both are working fine.

orc_sp:

select gss.rid,gss.cid, , from ( select rid,pid,avg(case statement)
from guestss gss
where pid= .pid and
isrec=.isrec and
smthg=.smthg
Group By piid,isrec,smthg
gss, GuestStat gstat
WHERE gstat.pid = gss.pid
AND (gstat.pid = prc_Updt.profileid
AND gstat.cid = prc_Updt.cid
AND gstat.procode = prc_Updt.procode
AND gstat.isrec = prc_Updt.isrec);

sqlserver_sp:

Select
PId, ProCode, IsRec,
sum(case statement)

From
GuestSS gss WITH (NOLOCK)
Where
PID = @pID
and IsRec = @IsRec
and ProCode = @ProCode
Group By
PId, ProCode, IsRec

) gss
INNER JOIN GuestStat gstat WITH (NOLOCK)
ON
gstat.pID = gss.pID
WHERE
gstat.PID = @pID
and gstat.cID = @cID
and gstat.proCode = @proCode
and gstat.isRec = @isRec


my question is does both perform same function or not.


Thanks in advance.