camaleonCHILE
IS-IT--Management
- Jul 7, 2005
- 20
Hi dear friends !!!
I need obtain a return value from a function. In this function, I work with a query built dynamically, from which I get the value. So the thing is:
DECLARE @X INTEGER
DECLARE @STRING NVARCHAR(4000)
SET @STRING='SELECT COUNT(*) FROM MY_TABLE'
EXECUTE(@STRING)
i need to put the count(*) value in the @X variable and return it.
Thanks in advance
I need obtain a return value from a function. In this function, I work with a query built dynamically, from which I get the value. So the thing is:
DECLARE @X INTEGER
DECLARE @STRING NVARCHAR(4000)
SET @STRING='SELECT COUNT(*) FROM MY_TABLE'
EXECUTE(@STRING)
i need to put the count(*) value in the @X variable and return it.
Thanks in advance