Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to get user input but I get an error and I'm not sure what to do,as I'm new into databases and according to w3schools this is the way to do it.

vers = getRequestString("Give the version you want:");

I get Incorrect syntax near 'vers'. What am I missing?

share|improve this question

closed as off-topic by Paul White, Mark Storey-Smith, bluefeet, Max Vernon, Kin Nov 13 '13 at 15:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Mark Storey-Smith, bluefeet, Kin
If this question can be reworded to fit the rules in the help center, please edit the question.

The SQL Server engine has no means to request user input. This needs to be done by your application/query tool. (Your application might be SQL Server Reporting Services for example or something that you programmed yourself). – Martin Smith Nov 13 '13 at 11:35

Like Martin stated above, SQL Server cannot accept input or parameters directly from users. Normally you would have an application collect the data and then pass it to the database.

Can you provide more information about how the input is being collected from the user?


share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.