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 insert duplicate key in object... #38

Open
ZedZipDev opened this issue Nov 21, 2022 · 1 comment
Open

Cannot insert duplicate key in object... #38

ZedZipDev opened this issue Nov 21, 2022 · 1 comment

Comments

@ZedZipDev
Copy link

ZedZipDev commented Nov 21, 2022

I run the latest suggested_tables.sql on SQL 2019:

Warning: The join order has been enforced because a local join hint is used.
Msg 2627, Level 14, State 1, Line 119
Violation of PRIMARY KEY constraint 'PK__#TablesT__9A619291CF883BDB'. Cannot insert duplicate key in object 'dbo.#TablesToColumnstore'. The duplicate key value is (215723871).
The statement has been terminated.
Warning: Null value is eliminated by an aggregate or other SET operation.


I have fixed this way::
create table #TablesToColumnstore(
[ObjectId] int NOT NULL,-- PRIMARY KEY, -- <------!
[TableLocation] varchar(15) NOT NULL,

@ZedZipDev
Copy link
Author

It is again the
#14

but I have got the freshest version of the scripts

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

1 participant