Sorting problem in NAV running on SQL

marvinq
Member Posts: 69
Hi,
I have a sorting problem running NAV on SQL.
I have tried almost anything now on Windows sorting or SQL-sorting. I cannot get the sorting of g/l accounts to get right.
It sorts like this..
1
10
2
I've read that some advices others to change the type, and others to write 0001, 0010 and 0002 to get the correkt sorting. But can this really be true. There must exist some collation which sorts the data as I want e.g. 1,2,10.
Please help me. What to do?
Thanks in advance
I have a sorting problem running NAV on SQL.
I have tried almost anything now on Windows sorting or SQL-sorting. I cannot get the sorting of g/l accounts to get right.
It sorts like this..
1
10
2
I've read that some advices others to change the type, and others to write 0001, 0010 and 0002 to get the correkt sorting. But can this really be true. There must exist some collation which sorts the data as I want e.g. 1,2,10.
Please help me. What to do?
Thanks in advance
0
Comments
-
that's the way sql works, use codes as suggested or switch to native.
You can also create a new field with the right numbering (001,002,010) and order the table by this code. then show your real field0 -
There are some tricks for this, but most useless because this is a core table.
You can change the SQL datatype to integer or variant, but that means changing all tablerelations which is undoable with the G/L.
The best solution is to enable the SourceTableTemporary property and create a function InitGL. A temp table sorts like native.
The GL Account table is small. It will work.0 -
There used to be an option in earlier versions (4 SP3) on the field properties called "SQL Data Type". :whistle:
Edit:
Sorry... It's still there but the field is text... :oops:0 -
Mark Brummel wrote:The best solution is to enable the SourceTableTemporary property and create a function InitGL. A temp table sorts like native.0
-
Mark Brummel wrote:You can change the SQL datatype to integer or variant, but that means changing all tablerelations which is undoable with the G/L.
What do you mean with "undoable"?
I prefer a simple solution, changing the SQL Data Type to Integer works good for me. Before I was able to do that I had to remove a few padding zero's.
This is what the Upgrade Toolkit advises as a possible solution.
After doing this one line was sorted different, but this was not problem for the customer.
Changing the SQL Data type has nothing to do with table relations as table relations are on NAV level and only the data type on SQL level is changed.0 -
Hi,
I have a table primary key is No. and defined as code, SQL Data type=Integer. This worked for couple of years until last month our customer reported an issue. When they used NAV search from the list for No. field. If they choose
Match......Beginning of Field
Match Case=True
Use the Best Key=False
Find As you Type=True
And when they typed in the 4th character in Find What, the Navision would crash. I tested that and eventually found that if I removed SQL Data Type=Integer, this issue would be solved. Does any one know this issue and if Microsoft has hotfix for that?
I tested by using Cronus G/L Account table, this would not happen, so I assumed that only when a table with a lot of records will have this issue.
Tom0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions