How can call function inside stored procedure in sql server 2005

Posted by Sekar.C under Sql Server on 4/5/2012 | Points: 10 | Views : 11526 | Status : [Member] | Replies : 3
Hi,
How can call function inside stored procedure in sql server 2005
Regards
Sekar.c

Regards
Sekar.c



Responses

Posted by: Sksamantaray on: 4/5/2012 [Member] Silver | Points: 25

Up
0
Down
Hi
Refer to:
http://msdn.microsoft.com/en-us/library/ms188332.aspx

Thanks,
Sanjay

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: sankarmjlive-12768 on: 4/5/2012 [Member] Starter | Points: 25

Up
0
Down
Dear Sekar,

you could try in this way

SELECT * FROM table1 WHERE EMAILID='myuser@gmail.com' AND id NOT IN (SELECT PART FROM DBO.splitvalues(@id,',')))

splitvalues - function in my database

PART - is a string which returns comma separated values from the fn

Thank you

Shankar.M
Think more... Code less

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Leila on: 4/12/2012 [Member] Starter | Points: 25

Up
0
Down
if the returned value of the function is a table, you can call it as following:
SELECT * FROM dbo.Function()

if the returned value is a scalar value
select dbo.function(@param1, @param2, Field1), Field1 from table


Thanks,
Leila

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response