Subject: | SQL ERROR: 'DECIMAL(6' is not a recognized data type! |
# SQL ERROR: 'DECIMAL(6' is not a recognized data type!
# SQL ERROR: 'DECIMAL(6' is not a recognized data type!
# discovered while attempting to
# use Class::DBI::Loader::Relationship;
# via Maypole with Class::DBI::SQLite, which basically does
use SQL::Statement;
my $sql = q~
CREATE TABLE product (
id INTEGER PRIMARY KEY NOT NULL,
category int(11),
subcategory int(11),
manufacturer int(11),
part_number varchar(50),
name varchar(50),
cost decimal(6,2),
description text(65535)
)~;
# $sql .= ';';
# dunno if it matters, but adding a ; at the end causes:
# SQL ERROR: Can't find column definitions!
# SQL ERROR: Can't find column definitions!
#
# which is misleading
my $parser = SQL::Parser->new('AnyData', { RaiseError => 1});
$parser->feature("valid_data_types","TIMESTAMP",1);
$parser->parse($sql);