Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with parser 'SQL::Translator::Parser::Sybase' #78

Open
mrmuskrat opened this issue Dec 29, 2015 · 3 comments
Open

Error with parser 'SQL::Translator::Parser::Sybase' #78

mrmuskrat opened this issue Dec 29, 2015 · 3 comments

Comments

@mrmuskrat
Copy link

$ ~/perl5/bin/sqlt-graph --from=Sybase -o test.png test.sql

   ERROR (line 1): Invalid statement: Was expecting create table, or
                   create procedure, or create index, or create
                   constraint, or comment, or use, or setuser, or if, or
                   print, or grant, or exec

Error: translate: Error with parser 'SQL::Translator::Parser::Sybase': no results at /home/musgrom/perl5/bin/sqlt-graph line 195.

$ perl -MSQL::Translator -e 'print $SQL::Translator::VERSION, $/;'
0.11021_01

test.sql.txt

@mrmuskrat
Copy link
Author

This appears to be similar in nature to issue #33.

@mrmuskrat
Copy link
Author

mrmuskrat commented Jul 13, 2017

It appears that SQL::Translator::Producer::Sybase creates SQL that SQL::Translator::Parser::Sybase cannot consume. The former creates comments like:

-- 
-- Created by SQL::Translator::Producer::Sybase
-- Created on Thu Jul 13 11:07:31 2017
-- 
--
-- Table: SomeTable
--

However SQL::Translator::Parser::Sybase only knows how to deal with C-style comments.

/* this is 
a C-Style comment
that spans multiple lines */

@mrmuskrat
Copy link
Author

It looks there are more issues yet with the SQL created by SQL::Translator::Producer::Sybase.
If I simply strip out all comments and blank lines SQL::Translator::Parser::Sybase fails to parse the first create table statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant