You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Last fix worked allowing me to test further.
Hopefully this is the last for this one table, found 3 parts of this constraint that (separately) cause a parse error in sqlglot:
The 1st parse issue is the ASC in the [zip_cd_mkey] ASC
The 2nd parse issue is the WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
The 3rd parse issue is the 1st occurrence of ON [PRIMARY]
TSQL query (successful on sqlfiddle):
CREATE TABLE [dbo].[mytable](
[zip_cd_mkey] [int] NOT NULL,
[zip_cd] [varchar](5) NULLCONSTRAINT [pk_mytable] PRIMARY KEY CLUSTERED
(
[zip_cd_mkey] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS =ON, ALLOW_PAGE_LOCKS =ON) ON [PRIMARY]
) ON [PRIMARY]
Last fix worked allowing me to test further.
Hopefully this is the last for this one table, found 3 parts of this constraint that (separately) cause a parse error in sqlglot:
ASC
in the[zip_cd_mkey] ASC
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
TSQL query (successful on sqlfiddle):
Fully reproducible code snippet
Official Documentation
https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-ver16
The text was updated successfully, but these errors were encountered: