I am trying to convert a db2 (db2look) look dump to mysql schema. I get the error below:
Invalid statement: Was expecting comment, or create
Error: translate: Error with parser 'SQL::Translator::Parser::DB2': n
+o results at /usr/bin/sqlt line 290.
The command that I ran was
sqlt -f DB2 -t MySQl dumpdb2.sql
I have also tried
my $translator = SQL::Translator->new(
debug => 1,
trace => 0,
no_comments => 1,
show_warnings => 0,
add_drop_table => 0,
validate => 1,
);
my $output = $translator->translate(
from => 'DB2',
to => 'MySQL',
# Or an arrayref of filenames, i.e. [ $file1, $file2, $file3 ]
filename => 'test.sql',
) or die $translator->error;
print $output;
No matter how I do it, I get that same error message, can anyone send me some monk's inner light?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.