C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » SQL Server »

Function is not working


Posted Date: 13 Oct 2005      Posted By: srujana      Member Level: Silver     Points: 5   Responses: 5



Hi

I created one function in sql but it is not executing properly. plz execute this:


create function getempname
(@eno int)returns varchar(20)
as
begin
return (select ename from emp where empno=@eno)
end

declare @ename varchar(20)
set @ename=dbo.getempname(7369)
print @ename


srujana





Responses

Author: Manoj Gawande    13 Oct 2005Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

What error is is giving.

I do not see anything wrong with code, but it might happen that your passing parameters are not the same as you have defined in the function.

Or the underlying table used in the function is not present.



Author: K.AnjaniDevi    13 Oct 2005Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

it executed properly.u will check table name and field names properly.


Author: kathirvelavan    14 Oct 2005Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

Hi Friend

How r u? Y no reply long time. Check ur nmail plsss .... reply to me



Author: DurgaprasadCh    17 Oct 2005Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

Hi,
There is nothing wrong with the code, it should work properly. If it's not working just put elaborated steps for error. (description).

-Durga.



Author: Amit Khurana    17 Oct 2005Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

no Problem With the Code At All.... just Check Your Variable names i Think They Are Mismatching....
Reply Me If Still U HAve In Problem ...i will Pull You Out

Amit Khurana



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Exporting SQL Server Table to Excel Using DTS
Previous : trigger problem.
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use