When I execute a stored proc via cfstoredproc
, I am getting a different result than calling that stored proc via cfquery
. I am passing in the same exact parameter values to each call. And also, when I run the stored proc in SQL Studio, I get the correct results (same as the cfquery).
Here's the cfstoredproc
call
<cfstoredproc datasource="#request.mainDSN#" debug="#request.debug#" procedure="rankingresults">
<cfprocparam type="in" value="8652" CFSQLType="CF_SQL_INTEGER">
<cfprocparam type="in" value="50" CFSQLType="CF_SQL_INTEGER">
<cfprocparam type="in" value="53" CFSQLType="CF_SQL_INTEGER">
<cfprocresult name="local.listing">
</cfstoredproc>
Here is the cfquery
call
<cfquery datasource="#request.mainDSN#" name="rankings">
EXEC rankingresults
@CityZipId = 8652,
@distance = 50,
@sic = 53
</cfquery>
The results are completely different. It's not even close. I've been banged my head over this for several hours, and I can't figure out why it is doing what it is doing.
UPDATE
The stored proc is massive (and one that I inherited), so I'm not going to paste it all here: http://pastebin.com/EtufPWXf