Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi alll,
EmployeeId,
UserName,
FirstName,
LastName,
UserType,
Department,
Designation,
MobileNumber1,
City,
Country
these are the fields
what is the stored procedure for selected value
Posted
Comments
ZeeroC00l 17-May-11 5:59am    
-- Question is not clear. Make sure others understand what exactly you are looking for.
What are the selected values ?? And what you want to do in stored procedure ?
Abhinav S 17-May-11 6:02am    
Tried anything?

In addition to the Above Solution here is one simple solution


create Procedure ProcedureName
(
@Id //Based on which you want to filter your details
)
as
SELECT FirstName, LastName, JobTitle, Department // Your columns Name which you want to return

FROM HumanResources // Your Table Name

WHERE DeptId = @Id //Where Condition to filter your Result
 
Share this answer
 
Do a search on the internet and go through some tutorials on writing stored procedures.
Try out the msdn website.

You might also want to pick up some basic books on stored procedures and go through them.
 
Share this answer
 
You need to learn how to create Stored Procedure Take a look at given links
How to: Create a Stored Procedure[^]
How to Write Store Procedure[^] and
SQL Server Stored Procedures for Beginners[^]
 
Share this answer
 
v2
Go to your Sql server Stored procedure, create new stored procedure.
Then you just provide your stored procedure name in create procedure and after that declare your parameters.
 
Share this answer
 
Go to your SQL SERVER.... Select the db-- Programabillity-------Storedprocedure----New Stored Procedure

*************************************************************

or Copy the below code and paste in sqlserver. and make nessecary changes

XML
CREATE PROCEDURE <Procedure_Name, sysname, ProcedureName>
    -- Add the parameters for the stored procedure here
    <@Param1, sysname, @p1> <Datatype_For_Param1, , int> = <Default_Value_For_Param1, , 0>,
    <@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0>
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for procedure here
    SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
END
GO
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900