Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Cannot understand )' when attempting to convert on a Windows machine #110

Closed
larryq opened this issue Jul 18, 2019 · 4 comments
Closed

Comments

@larryq
Copy link

larryq commented Jul 18, 2019

Apologies if this has been discussed before, but I'm using the latest (as of 7/19/2019) version of the script on a Windows 10 box with Strawberry perl installed. I'm trying to run this script but get the following error:

C:> perl sqlserver2pgsql.pl -f table_script2.sql -b tables-before.sql -a tables-after.sql -u
tables-unsure.sql
Cannot understand )
at convert.pl line 1571, <$file> line 16.
main::parse_dump() called at convert.pl line 3103

Here is the script in question, I've stripped it down to try and isolate things:

CREATE TABLE [dbo].[Actions](
[Id] [int] IDENTITY(1,1) NOT NULL,
[IsDeleted] [bit] NOT NULL,
[CreatedBy] nvarchar NULL,
[Created] datetimeoffset NULL,
[ModifiedBy] nvarchar NULL,
[Modified] datetimeoffset NULL,
[RowVersion] [timestamp] NOT NULL,
[Main_Incident] [int] NOT NULL,
[Main_Person] [int] NOT NULL
PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
)

Line 16 in the script is the one with the final right parenthesis. Am I doing something wrong, or is there an issue with line ending incompatibilities possibly?

@madtibo
Copy link
Contributor

madtibo commented Jul 19, 2019

Hello @larryq

This is very strange: I do not have the same error as you.
I get: Cannot understand [Id] [int] IDENTITY(1,1) NOT NULL,
It would be linked to IDENTITY columns. There is an open issue about this: #102

For me to investigate your issue, can you give me this exact file that gives you an error on the parenthesis?

Cordialement,

@larryq
Copy link
Author

larryq commented Jul 19, 2019

You bet, here's the file in question, attached in a zip file. Thanks for the help!

table_script.zip

@madtibo
Copy link
Contributor

madtibo commented Aug 23, 2019

I get the same error as before:

$ ./sqlserver2pgsql.pl -b /tmp/before_file -a /tmp/after_file -u /tmp/unsure_file -f tickets/table_script.sql 
Cannot understand [Id] [int] IDENTITY(1,1) NOT NULL,

 at ./sqlserver2pgsql.pl line 1571, <$file> line 2.
	main::parse_dump() called at ./sqlserver2pgsql.pl line 3103

Not sure why we do not get the same error... but I should definitively work on #102...

@madtibo
Copy link
Contributor

madtibo commented Oct 7, 2019

Issue should be solved.
Oups, not this one!

@madtibo madtibo closed this as completed Oct 7, 2019
@madtibo madtibo reopened this Oct 7, 2019
@madtibo madtibo closed this as completed Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants