Subject: | SQL::Translator::Parser::Sybase does not return table name |
The table name is not included in the output of 'create table'
statements (tried several producers):
#!/usr/bin/perl
use strict;
use warnings;
use SQL::Translator;
my $t = SQL::Translator->new(
debug => 0,
trace => 0,
no_comments => 0,
show_warnings => 1,
add_drop_table => 1,
quote_table_names => 0,
quote_field_names => 0,
);
my $data;
while (<DATA>) {
$data .= $_;
}
my $output = $t->translate(
from => 'Sybase',
to => 'Oracle',
datasource => \$data,
);
print "$output\n";
__END__
create table foobar (
col1 varchar(20),
col2 varchar(50)
)
go
# Outputs:
--
-- Created by SQL::Translator::Producer::Oracle
-- Created on Tue Dec 7 10:38:41 2010
--
--
-- Table:
--;
DROP TABLE CASCADE CONSTRAINTS;
CREATE TABLE (
col1 varchar2(20),
col2 varchar2(50)
);
/