stored procedures [message #128656] |
Sat, 11 February 2006 06:08 |
Eclipse User |
|
|
|
Originally posted by: dearsugam.gmail.com
How to call the stored procedures with out passing the arguments.
I am storing the values in temporary table and retrieving the values by
using select statement.I am not seeing the output in the preview results
and the columns are not available in the dataset.
My Stored Procedure:
-----------------------------------------------
ALTER procedure usp_entities
AS
declare @client varchar(10)
declare @vendor varchar(10)
declare @purchaseorder varchar(10)
declare @candidate varchar(10)
create table #temp(entityname varchar(20),count varchar(10))
SET @client = (select count(entityname) from client)
insert into #temp values('client',@client)
SET @vendor = (select count(entityname) from vendor)
insert into #temp values('vendor',@vendor)
SET @purchaseorder = (select count(entityname) from purchaseorder)
insert into #temp values('purchaseorder',@purchaseorder)
SET @candidate = (select count(entityname) from candidate)
insert into #temp values('candidate',@candidate)
select * from #temp
---exec usp_entities
----------------------------------------------
Stored Procedure Result:
entityname count
-------------------- ----------
client 1090
vendor 495
purchaseorder 821
candidate 736
Thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.25752 seconds