Skip Menu |
 

This queue is for tickets about the SQL-Translator CPAN distribution.

Report information
The Basics
Id: 115874
Status: open
Priority: 0/
Queue: SQL-Translator

People
Owner: Nobody in particular
Requestors: sethu.krishna [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: sqlt - not working
Date: Mon, 4 Jul 2016 23:27:53 -0400
To: bug-SQL-Translator [...] rt.cpan.org
From: Sethu Krishnamurthy <sethu.krishna [...] gmail.com>
Download (untitled) / with headers
text/plain 16.5k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/html 20.6k

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #115874] sqlt - not working
Date: Tue, 05 Jul 2016 22:52:14 +0100
To: bug-SQL-Translator [...] rt.cpan.org
From: ilmari [...] ilmari.org (Dagfinn Ilmari Mannsåker)
Hi, The plain text version of this report was severely mangled, I've reformatted the relevant bits as I best can below. "Sethu Krishnamurthy via RT" <bug-SQL-Translator@rt.cpan.org> writes: Show quoted text
> perl -MSQL::Translator -le 'print $SQL::Translator::VERSION' > 0.11021 > > Input file: nl /home/kicha/database/MSSQL/tmp1 > 1 create table Customer ( > 2 Id int identity, > 3 FirstName nvarchar(40) not null, > 4 LastName nvarchar(40) not null, > 5 City nvarchar(40) null, > 6 Country nvarchar(40) null, > 7 Phone nvarchar(20) null, > 8 constraint PK_CUSTOMER primary key (Id) > 9 ) > 10 go > 11 /*==============================================================*/ > 12 /* Index: IndexCustomerName */ > 13 /*==============================================================*/ > 14 create index IndexCustomerName on Customer ( > 15 LastName ASC, > 16 FirstName ASC > 17 ) > 18 go
Does this match your original file? Show quoted text
> Command: sqlt --from SQLServer --to MySQL /home/kicha/database/MSSQL/tmp1 > Error: translate: Error with parser 'SQL::Translator::Parser::SQLServer': > Unable to parse line 1: > 'create table Customer (' > ' Id int identity,' > ' FirstName nvarchar(40) not null,' > ' LastName nvarchar(40) not null,' > ' City nvarchar(40) null,'...
With the above file, I get an error in a different place: $ sqlt --from=SQLServer --to=MySQL test.sql Error: translate: Error with parser 'SQL::Translator::Parser::SQLServer': Unable to parse line 13: '' 'create index IndexCustomerName on Customer (' ' LastName ASC,' ' FirstName ASC' ')' This is because SQL::Translator doesn't support modifiers such as ASC/DESC or more complex expressions in indexes, just plain column names. Does it work if you remove the ASCs (which I believe is the default anyway) from the index definition? Regards, Ilmari
CC: darren [...] cpan.org
Subject: Re: [rt.cpan.org #115874] sqlt - not working
Date: Tue, 5 Jul 2016 21:03:40 -0400
To: bug-SQL-Translator [...] rt.cpan.org
From: Sethu Krishnamurthy <sethu.krishna [...] gmail.com>
Download (untitled) / with headers
text/plain 2.9k
It does not work at all. Something wrong with the setup of perl modules,... Changed input file as below: kicha@kicha-G41MT-S2PT:~/database/MSSQL$ cat tmp2 create table Customer ( Id int not null ) go Still getting the same error: kicha@kicha-G41MT-S2PT:~/database/MSSQL$ sqlt --from SQLServer --to MySQL /home/kicha/database/MSSQL/tmp2 Error: translate: Error with parser 'SQL::Translator::Parser::SQLServer': Unable to parse line 1: 'create table Customer (' ' Id int not null' ')' 'go' '' Thank you for the quick response. Regards, Kicha On Tue, Jul 5, 2016 at 5:52 PM, (Dagfinn Ilmari Mannsåker) via RT < bug-SQL-Translator@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=115874 > > > Hi, > > The plain text version of this report was severely mangled, I've > reformatted the relevant bits as I best can below. > > "Sethu Krishnamurthy via RT" <bug-SQL-Translator@rt.cpan.org> writes: >
> > perl -MSQL::Translator -le 'print $SQL::Translator::VERSION' > > 0.11021 > > > > Input file: nl /home/kicha/database/MSSQL/tmp1 > > 1 create table Customer ( > > 2 Id int identity, > > 3 FirstName nvarchar(40) not null, > > 4 LastName nvarchar(40) not null, > > 5 City nvarchar(40) null, > > 6 Country nvarchar(40) null, > > 7 Phone nvarchar(20) null, > > 8 constraint PK_CUSTOMER primary key (Id) > > 9 ) > > 10 go > > 11 /*==============================================================*/ > > 12 /* Index: IndexCustomerName */ > > 13 /*==============================================================*/ > > 14 create index IndexCustomerName on Customer ( > > 15 LastName ASC, > > 16 FirstName ASC > > 17 ) > > 18 go
> > Does this match your original file? >
> > Command: sqlt --from SQLServer --to MySQL /home/kicha/database/MSSQL/tmp1 > > Error: translate: Error with parser 'SQL::Translator::Parser::SQLServer': > > Unable to parse line 1: > > 'create table Customer (' > > ' Id int identity,' > > ' FirstName nvarchar(40) not null,' > > ' LastName nvarchar(40) not null,' > > ' City nvarchar(40) null,'...
> > With the above file, I get an error in a different place: > > $ sqlt --from=SQLServer --to=MySQL test.sql > Error: translate: Error with parser 'SQL::Translator::Parser::SQLServer': > Unable to parse line 13: > '' > 'create index IndexCustomerName on Customer (' > ' LastName ASC,' > ' FirstName ASC' > ')' > > This is because SQL::Translator doesn't support modifiers such as > ASC/DESC or more complex expressions in indexes, just plain column > names. Does it work if you remove the ASCs (which I believe is the > default anyway) from the index definition? > > Regards, > > Ilmari > >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.