I'm calling a Sybase Stored Proc X that returns data that is used by a servlet.
Within Stored Proc X, Stored Proc get_business_day is called in the following manner:
exec get_business_day @CBDate, -1, @prevBusDay output
So, the result of calling this (in DBArtisan) is:
6/25/2010 12:00:00.000 AM
1 row(s) affected.The issue is that I do not need this above row to be outputted when executing X, as the output I get (in DBArtisan) is:
6/25/2010 12:00:00.000 AM
-2817773441.669999This will obviously affect the results obtained by the servlet as it ex开发者_StackOverflow社区pects only the value -2817773441.669999.
Is there any way to suppress the output of get_business_day appearing when calling X?
Thx Agnyata
here is the what you want to do:
main proc:
...
create table #tmp(
CBDate datetime
)
EXEC get_business_day @CBDate, -1
select CBDate from #tmp
-- use it
drop table #tmp
-- before end
get_business_day:
create table #tmp(
CBDate datetime
)
go
create proc get_business_day
as
-- find the value to be inserted into @day
insert into #tmp select @day
go
drop table #tmp
go
try capturing the result set in a temp table, something like this:
CREATE TABLE #BadResultSet (DateOf datetime)
INSERT INTO #BadResultSet (DateOf)
EXEC get_business_day @CBDate, -1, @prevBusDay output
精彩评论