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 |
tvspsekhar
Starting Member
20 Posts |
Posted - 2010-03-25 : 03:37:25
|
Please give me the syntax to prompt for the user and to read the input.For example in any select statement for using where clause to give the eno as given by the user.Select * from employee where eno = ---- It should prompt for the user to enter the eno and then to execute the select statement.Please help me out.tvspsekhar |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-25 : 04:05:56
|
No way in T-SQL.I think you know that from ACCESS but this isn't possible in T-SQL. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-03-25 : 04:22:07
|
SQL server does not have a front end that the users can interact with. This is usually created in c#/php/access/whatever...- LumbagoIf the facts don't fit the theory, change the facts. Albert Einstein |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-25 : 05:00:30
|
quote: Originally posted by tvspsekhar Please give me the syntax to prompt for the user and to read the input.For example in any select statement for using where clause to give the eno as given by the user.Select * from employee where eno = ---- It should prompt for the user to enter the eno and then to execute the select statement.Please help me out.tvspsekhar
That is the job of a front end applicationMadhivananFailing to plan is Planning to fail |
 |
|
tvspsekhar
Starting Member
20 Posts |
Posted - 2010-03-25 : 05:56:01
|
OK. Thank U all.tvspsekhar |
 |
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2010-03-25 : 06:21:20
|
The best you can do without a front end is to write a stored proc with paramaters. If you were to right click on the stored proc in management studio it can prompt you for the run time values for parameters.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
|
|