0

Hi!

I want to execute the sql query based on the question. For Example, In Textbox If i enter the question like "What are the department in allahabaduniversity" means following query will be executed "select department from allahabaduniversity;" , Here department is a filed and allahabaduniversity is table,

Please Help Me to do this...

Thanks!

Regards!

G.Arun Prasath

4
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by kamilacbe
0

hi,
Your question does'nt make any sense because sql is a language with predefined rules and syntax.Unless you let whoever is writing the statement select from dropdownlists the values that represent actual database fields its going to be very hard.

You should form your queries in code depending on the selections made by users unlike letting them write the queries coz you cant control what they write.

You can however refine your question to be more clear.

1

I think the OP was referring to parsing the user input and using some form of language syntax rules to build an SQL statement from the words entered. This is very difficult to do properly and I would be tempted to use the drop down list method suggested above. Maybe not as cool and a little clunky, but at least it is easily achievable.

0

hii..

I guess you can pass those question in a dropdownlist and can pass event if that particular question is selected then the respective query has to work ...as others said its too hard to predict what they write as the input in text box.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.