java 1.4 Sql server 2000
i am taking input of sql query (for validation of field value against values retrieved by executing sql query) from admin user which will be
Why would you let them enter whole sql-statements?
Just provide to fields and let them enter either the statecode or the districtcode.
Then check if the entered value is a number. And run the appropriate query with the entered value.