i want to scan a sql file and extract all the select statements from the sql file using java. then from the select statement i have to take the count of tables the query is using. if the count is more than 4 i have to display a warning message that more than 4 tables not allowed. i am trying using scanner class in java. but am not able to do .can any one pls help me out on this..???