Code datatype with SQLServer

Cindy101Cindy101 Member Posts: 33

I'm doing an upgrade on a 3.7 database, and then using the new 5.0 sp1 db on a SQLServer. I'm having an issue with one of the code datatypes - "Job Task"."Job Task No."

I understand how sql wants to sort the Code fields, but this field I need to be sorted the correct (accounting) way.

I found this: ... NAV_vs_SQL

Which definitely explains what I want to do, but I don't know how to go about doing it. The field is all numeric in all companies, so I shouldn't run into any problems, once I know what I'm supposed to do ;)

Thanks in advance.


  • krikikriki Member, Moderator Posts: 9,079
    Before doing this in the production DB, you should first do this in a test DB and test a lot!

    Open the table in which there is a field you want to change.
    Show the properties of the field. Property "SQL Data Type" defines how the Code-field is stored in the DB. Change it to integer or Biginteger and save the table. Saving can take a while because NAV has to change the datatype of the field in SQL.
    Now you have to do that for ALL fields in which the field can be stored.

    One remark :
    if you need to do that for items but NOT for G/L Accounts, you can have problems : in table 37:"Sales Line", field "No." is used for items AND G/L accounts...
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!

  • Cindy101Cindy101 Member Posts: 33
    Many thanks!

    Luckily I still have a week before the final upgrade to test this out. :D
Sign In or Register to comment.