The fork at github has statements processing included. Look at the examples. I don't know if it is already done here at the original.
I am reading files that have multiple statements in them with comments. I want to verify the SQL syntax in each file.
Example of one file:
-- - Bubba's SQL
INSERT INTO 'BUBBA_SQL' (id, userid, realname, displayname) VALUES ( 1000000, 'bubba@bubba.com', 'BUBBA JOE', 'Bubba');
UPDATE 'BUBBA_SQL' set realname = 'Bubba Jean' WHERE id = 1000000;
end Example:
Do I have to tokenize/read each statement individually passing them to the CCJSqlParserManager to verify syntax?
Or is there a method to allow a return of Statement[] or List from a file.
Having to pre-parse the file before hand looks like what I need to do, but I figured I would ask.
Thanks ahead of time. :-)
SQL Offline Syntax Checks
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jsqlparser/discussion/360151/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Thanks, I figured it out and posted the code in help.
I'm now running into couple of problems. The sql I am looking at has ` and not ' so I think that is causing a problem.
Does JSqlParser handle Stored procedure code? aka BEGIN;
I hate the sql I am looking at. :-(
Log in to post a comment.
The fork at github has statements processing included. Look at the examples. I don't know if it is already done here at the original.
I am reading files that have multiple statements in them with comments. I want to verify the SQL syntax in each file.
Example of one file:
-- - Bubba's SQL
INSERT INTO 'BUBBA_SQL' (id, userid, realname, displayname) VALUES ( 1000000, 'bubba@bubba.com', 'BUBBA JOE', 'Bubba');
UPDATE 'BUBBA_SQL' set realname = 'Bubba Jean' WHERE id = 1000000;
end Example:
Do I have to tokenize/read each statement individually passing them to the CCJSqlParserManager to verify syntax?
Or is there a method to allow a return of Statement[] or List from a file.
Having to pre-parse the file before hand looks like what I need to do, but I figured I would ask.
Thanks ahead of time. :-)
SQL Offline Syntax Checks
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jsqlparser/discussion/360151/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Thanks, I figured it out and posted the code in help.
I'm now running into couple of problems.
The sql I am looking at has ` and not ' so I think that is causing a problem.
Does JSqlParser handle Stored procedure code? aka BEGIN;
I hate the sql I am looking at. :-(
Last edit: highnoon 2014-06-24