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:
[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
THEN 'Navision 6 / 2009'
WHEN [databaseversionno] BETWEEN 60200
THEN 'Navision 6 / 2009 R2'
WHEN [databaseversionno] BETWEEN 70200
THEN 'Navision 7 / 2013'
WHEN [databaseversionno] >= 70720
THEN 'Navision 7 / 2013 R2 (or later)'
,[databaseversionno] as [NAV Database Version No]
Courtesy of Jet Reports KB article.
Alterntively for my AX people out there:
DESCRIPTION = 'finished'
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!)