Hi
i'm trying to add a primary key and set an index upon output.
My code is like this, but I get an syntax error. And I don't know how to correct it?
ALTER TABLE UNIFY_DK_POST_CH
ALTER COLUMN ID int NOT NULL;
ALTER TABLE UNIFY_DK_POST_CHUNIFY_DK_GLS_DE
ADD PRIMARY KEY (ID)
CREATE INDEX IX_ParcelNumberPurchase
ON dbo.UNIFY_DK_POST_CHUNIFY_DK_GLS_DE
(
ParcelNumberPurchase
)
GO
If i use this code:
ALTER TABLE UNIFY_DK_POST_CH
ALTER COLUMN ID int NOT NULL;
ALTER TABLE UNIFY_DK_POST_CH
ADD PRIMARY KEY (ID);
CREATE INDEX IX_ParcelNumberPurchase
ON dbo.UNIFY_DK_POST_CH
(
ParcelNumberPurchase
)
GO
I get:
Start: Designer x64: Started running C:\Users\dennis.schlein.HEARTCORP\OneDrive - Heartland AS\Desktop\UNIFY\POST CH\UNIFY POST CH FLOW.yxmd at 05/25/2021 14:43:04
Error: Output Data (51): Executing PostSQL: "CREATE INDEX IX_ParcelNumberPurchase
ON dbo.UNIFY_DK_POST_CH
(
ParcelNumberPurchase
)
GO;" : [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near ';'.
Error: Output Data (51): Error running PostSQL on "UNIFY_DK_POST_CH": [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near ';'.
End: Designer x64: Finished running UNIFY POST CH FLOW.yxmd in 2,3 seconds with 2 errors and 11 warnings
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |