table with stored procedure field

Hi all,

I have a problem with run and stored procedure field of table, No run of workflow rule.

I created a new field of stored procedure type in company table. My objective is to get the number of opportunities open by current company, and display it in read-only field. In the parameter field value I specified the name of the stored procedure, in this case "Opportunity", in the database without passing parameters, with the following contents while testing:

"CREATE PROCEDURE [Opportunity]

@table_name nvarchar (50),

@identity_name varchar (50),

@id_no int,

@logon_no int,

@return_value varchar(20) OUTPUT

AS

SELECT @return_value = '999'

RETURN (1)"

It want to return a value of my sql select. Is possible to filtre the sql select?

How I can return a value of sql select in a read only field of screen?? It is not necessary to store the value in the table, just consult.

Thanks for your time.