Starting a Perl project with my first foray into SQL land.
Looking forward to using SQLFairy as part of my toolchain to
ensure DB engine portability.

Unfortunately right out of the gate I'm running into an issue
where the parser says it expects a 'create' statement, but it is
dying on a line with a "CREATE" statement.  SQLite itself
consumes the statements with no issues.  Here are the details.
Thanks in advance for any insights.

...BC

$ sqlite3 --version
-- Loading resources from /Users/wfc/.sqliterc

3.7.13 2012-06-11 02:05:22 f5b5a13f7394dc143aa136f1d4faba6839eaa6dc
$ 
$ sqlt --version
Use of uninitialized value $from in pattern match (m//) at
/opt/local/bin/sqlt line 255.
SQL::Translator v0.11007
$
$ perl --version

This is perl 5, version 12, subversion 4 (v5.12.4) built for
darwin-thread-multi-2level
  :
  :
$ sqlt -d -f SQLite -t MySQL ac-core.sql3-schema 
[SQL::Translator] Got parser: code ref
[SQL::Translator] Got producer: code ref
[SQL::Translator] Got parser:
SQL::Translator::Parser::SQLite::parse
[SQL::Translator] Got producer:
SQL::Translator::Producer::MySQL::produce
[SQL::Translator] Got filename: 'ac-core.sql3-schema'
[SQL::Translator] Opening 'ac-core.sql3-schema' to get contents.
[SQL::Translator]
       ERROR (line 62): Invalid statement: Was expecting begin transaction, or
                        commit, or drop, or comment, or create
Error: translate: Error with parser 'SQL::Translator::Parser::SQLite':  no 
results at /opt/local/bin/sqlt line 353.
$
$ cat ac-core.sql3-schema.listing
    1    --        File: $POC_ROOT/ac-core.sql3-schema
        :
        :   (comments elided)
        :
   45  CREATE TABLE AliasProfile
   46    (
   47      apName        VARCHAR(25)                             NOT NULL, --PK
   48      apDomainCode  VARCHAR(1)                              NOT NULL, --PK
   49      apType        VARCHAR(2)                              NOT NULL,
   50      apOwner       VARCHAR(12)   DEFAULT 'aliasadm'        NOT NULL,
   51      apStatus      VARCHAR(5)    DEFAULT 'N'               NOT NULL,
   52      apCreateTS    TIMESTAMP     DEFAULT CURRENT_TIMESTAMP NOT NULL,
   53      apCreatedBy   VARCHAR(12)                             NOT NULL,
   54      apLastUpdate  TIMESTAMP,
   55      apUpdatedBy   VARCHAR(12),
   56      apRetireDate  DATE          DEFAULT '9999-99-99'      NOT NULL,
   57      apDescription VARCHAR(40),
   58
   59      PRIMARY KEY (apName, apDomainCode)
   60    );
   61
   62  CREATE TABLE AliasRule
   63    (
   64      apName        VARCHAR(25)                             NOT NULL, --PK
   65      apDomainCode  VARCHAR(1)                              NOT NULL, --PK
   66      arAddress     VARCHAR(80)                             NOT NULL, --PK
   67      arStartDate   DATE          DEFAULT CURRENT_DATE      NOT NULL, --PK
   68      arEndDate     DATE          DEFAULT '9999-99-99'      NOT NULL,
   69      arMissingDate DATE,
   70      arVectorCode  VARCHAR(1)                              NOT NULL,
   71      arTargetType  VARCHAR(10),
   72      arAddrOwner   VARCHAR(12),
   73      arCreateTS    TIMESTAMP     DEFAULT CURRENT_TIMESTAMP NOT NULL,
   74      arCreatedBy   VARCHAR(12)                             NOT NULL,
   75      arLastUpdate  TIMESTAMP,
   76      arUpdatedBy   VARCHAR(12),
   77      arComment     VARCHAR(40),
   78
   79      PRIMARY KEY (apName, apDomainCode, arAddress, arStartDate)
   80    );
$

That's all folks!

-- 
=====================================[ bill.co...@unh.edu ]==
  Bill Costa
  1 Leavitt Lane
  UNH IT -- 1st Floor
  University of New Hampshire
  Durham, NH  03824
  USA
  Voice: +1-603-862-3056
  No good deed... Goes unpunished.
===========================[ http://pubpages.unh.edu/~wfc ]==

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-- 
sqlfairy-developers mailing list
sqlfairy-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers

Reply via email to