ONYX REPORTING LTD.
  • Welcome
  • Services
  • Blog
  • YouTube Channel
  • Contact
  • Domo IDEA Exchange
    • Schedule
    • Call for Presenters
  • Welcome
  • Services
  • Blog
  • YouTube Channel
  • Contact
  • Domo IDEA Exchange
    • Schedule
    • Call for Presenters
Search

SQL - What Version of NAV is it?

15/12/2016

0 Comments

 
If you're anything like me, you've got multiple copies of NAV stored on your SQL server from various clients and if you forget to write down which version of NAV they're on, that can be a pain.  

Fortunately, table structure doesn't change THAAAAAT much ;) but just in case:

SELECT 
    [NAV Database Version] = CASE 
        WHEN [databaseversionno] = 40
            THEN 'Navision 4 SP2'

        WHEN [databaseversionno] = 80
            THEN 'Navision 5 / 2005'
        WHEN [databaseversionno] = 95
            THEN 'Navision 5 / 2005 SP1'
        WHEN [databaseversionno] BETWEEN 120
                AND 60199
            THEN 'Navision 6 / 2009'
        WHEN [databaseversionno] BETWEEN 60200
                AND 70199
            THEN 'Navision 6 / 2009 R2'
        WHEN [databaseversionno] BETWEEN 70200
                AND 70719
            THEN 'Navision 7 / 2013'
        WHEN [databaseversionno] >= 70720
            THEN 'Navision 7 / 2013 R2 (or later)'
        END
    ,[databaseversionno] as [NAV Database Version No]
FROM [dbo].[$ndo$dbproperty]

Courtesy of Jet Reports KB article.
Alterntively for my AX people out there:

SELECT [Version]
    ,[AppBuild]
FROM
    SYSSETUPLOG
WHERE 
    DESCRIPTION = 'finished'
ORDER BY    
    CREATEDDATETIME DESC

Now smart money would figure out how to take this code and integrate it into a Jet Enterprise or TimeXtender project so that you can include this as a table in your Data Warehouse.  (Looking at you Doug!)

0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Profile Picture Jae Wilson
    View my profile on LinkedIn

    Stay Informed.

    * indicates required

    RSS Feed

    Categories

    All
    Automation
    Basic Training Series
    Business Intelligence
    Connect
    Dashboard
    Data Pipeline
    Data Science
    Domo
    Excel Tricks
    Executive Training & Leadership
    Extract
    Jet Enterprise
    Jet Essentials
    New Release
    NP Function
    Onyx Reporting
    Planning
    Power Pivot
    Python
    Report Writing
    Statistics And Analytics
    TimeXtender
    Visualization

London, UK
jae@OnyxReporting.com
+44 747.426.1224
Jet Reports Certified Trainer Logo
  • Welcome
  • Services
  • Blog
  • YouTube Channel
  • Contact
  • Domo IDEA Exchange
    • Schedule
    • Call for Presenters