Sorry about the delay in responding, but I was able to parse your string at my end. As you have probably figured out by now, the problem is that after the semicolon you need an empty line. In fact, you need to terminate your included file with an empty line no matter whether you are using the ; on its own line or terminating the sql with a ;.
So your file should look like this:
--BOF
DELETE FROM table where column LIKE 'string%';
--EOF
or as Dave suggested:
--BOF
DELETE FROM table where column LIKE 'string%'
;
--EOF
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was trying to include a file in the setup tag of my text.xml
<setup>
<include file="test/oracle/SetUp.sql"></include>
</setup>
-----------------
Suppose the file includes only the following SQL stmt
DELETE FROM table WHERE column
LIKE 'string%';
---------------------
The error in the log file is
*** Running SQLUnit file: test/oracle/test.xml
Getting connection(DEFAULT)
Setting up tes [sqlunit] sqlunit-ant: System error
(net.sourceforge.sqlunit.parsers.ParseException):
Encountered "<EOF>" at line 6, column 2.
[sqlunit] Was expecting one of:
[sqlunit] <START_OTHER_SQL_CHAR> ...
[sqlunit] <OTHER_SQL_DELIMITER> ...
[sqlunit] <OTHER_SQL_CHAR> ...
[sqlunit]
-----------------------
Can u please help me find out a way to eliminate the error.
Try the following:
DELETE FROM table WHERE column
LIKE 'string%'
;
You didn't list version of sqlunit you are using, and I believe it has gotten smarter on this front.
HTH,
Dave
4.9 is the version thats in my system
You never indicated if moving the semicolon on to a newline made any difference.
You should probably also capture the debug information:
ant sqlunit-flat -Dtestfile=test/ASA/testtypes.xml -Ddebug=true -logfile out.txt
hi sir
when i moved the semicolon to a new line also i had the same error.
the error i have posted is from the log file.
if there is any other specific error string that u r expecting, please let me know.
i am using sqlunit 4.9 with oracle 9.2.0.1
i am also not able to compare two result sets.
i have posted another thread regarding that.
i would be greatful if u go through that thread also.
thankyou
P E stephen
Hi P E Stephen,
Sorry about the delay in responding, but I was able to parse your string at my end. As you have probably figured out by now, the problem is that after the semicolon you need an empty line. In fact, you need to terminate your included file with an empty line no matter whether you are using the ; on its own line or terminating the sql with a ;.
So your file should look like this:
--BOF
DELETE FROM table where column LIKE 'string%';
--EOF
or as Dave suggested:
--BOF
DELETE FROM table where column LIKE 'string%'
;
--EOF
-sujit