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

SqlServer reseed fix for objects with special character in name #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flarestudiopl
Copy link

@flarestudiopl flarestudiopl commented Nov 21, 2024

It is allowed by SqlServer to have schema with a dot in name. In such case both IDENT_SEED and CHECKIDENT won't recognize the table correctly, eg:

select IDENT_SEED('part.one.TableName') -- returns null
select IDENT_SEED('[part.one].[TableName]') -- returns proper value

This change adds QUOTENAME in required places.
Usage of IDENT_SEED can be also replaced by ic.seed_value.

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

Successfully merging this pull request may close these issues.

1 participant