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 stored in database and later i will executing sql query corresponding to field.Before inserting sql query in database i want to validate its syntax in java code.
Fields Sql Query
stateCode select statecode from states
district code select district code from districts