I've got a table in sqlserver with an id column with unique identifier type and default value newsequentialid(). I need to reference these keys from another table so i need to exactly move this column as FK to another table but when i use SQLExecutor() with query 'select id from table' to write these attribute the order of GUID's get disruted and does not maintain its original order? Is it possible to maintain its order?
Solved
SQLExecutor disrupts uniqueidentifier order? how to maintain it?
Best answer by takashi
Hi @dzhakob, generally you cannot expect any regularity on the order of records in a query result unless you specify the order explicitly with the SQL statement. Consider adding ORDER BY clause to the SQL statement if you need to sort the resulting records.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

