Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sajith
Starting Member
1 Post |
Posted - 2011-09-27 : 04:36:39
|
| Hi guys, I would like to create a search query to get a specific row of data from my table.The query which i used was select employeeid, employeenamefrom employeeWhere employeeid=1;i need a quey in which the system asks me to enter the employee id when i run the query and not me specifying it earlier |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-27 : 04:51:35
|
the prompting part should be done in your front end application. In sql you will add aprocedure to give you required data and it will have empid as a parameter like belowcreate proc getempdetails@empid intasselect employeeid, employeenamefrom employeeWhere employeeid=@empid;gothen call this procedure from your application asEXEC GetEmpDetails @empid=1 ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|