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