SELECT * FROM

navuser1navuser1 Member Posts: 1,329
Hi,

I have executed the following SQL query on a NAV Database for two different companies and I surprise to see the column sequence. It differs from one another.
SELECT * FROM CompanyName$TableName;

What is the reason behind it? How do I fix that ?

Thanks,
navuser1
Now or Never

Answers

  • irasoelbaksirasoelbaks Member Posts: 119
    edited 2021-03-23
    Please post the query result and provide more info please. I don't know what the real problem is.
    What do you mean with different companies? In 1 SQL database? What is column sequence? What is the difference? What version? OnPrem I assume?
  • navuser1navuser1 Member Posts: 1,329
    edited 2021-03-24
    I ran the below queries for two different company in a single database (OnPrem)
    • SELECT * FROM [CRONUS India Ltd_$Customer]
    • SELECT * FROM [CRONUS Test Ltd_$Customer]

    And I saw the below screenshot in the Result windows(for example).

    iem54wep7kl9.png


    Please give a look at Column No_, the column sequence should be the same.




    Now or Never
  • irasoelbaksirasoelbaks Member Posts: 119
    Please check the table definition in SSMS, is the column sequence in both companies the same?
    fiq79iuztn2g.png

    Strange problem ofcourse but is also causing issues?

  • navuser1navuser1 Member Posts: 1,329
    edited 2021-03-24
    We never ever touched the table definition from the Navision end ( using developer environment) or from the SQL end.
    Now or Never
  • irasoelbaksirasoelbaks Member Posts: 119
    Thanks, good to know.
    If it's not causing any issues you can ignore this strange behaviour IMO
    If you want to further investigate you can restore some default Cronus databases and compare the results.
Sign In or Register to comment.