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

Fix for issue of results table not returning data in insert order #20

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

Conversation

barneynicholls
Copy link

Hi, I noticed that the insert and identity on/off statements when pulling from a view often got mixed up and would appear randomly within the output.

I identified the issue being the @results table not having a primary key therefore the results wouldn't necessarily be returned in a specific order.

By adding an IDENTITY column then setting that as the Primary Key the issue was resolved.

Thanks for sql it's been a great help :)

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.

2 participants