I need to get the SQL commands from a .sql file using java.
The file contains lines with "--" at the start so ideally it would ignore these lines.
I have looked into using .useDelimiter("(;(\r)?\n)|(--\n)");
I need to use a while loop which reads the file and finds the SQL commands and executes them as it finds them. The examples I have looked at dont seem very efficent.
Any help on this would be much appreciated :)