NAV SP2 4.0 SQL - Trouble with filter in Acc. Aschelude

S0918423470S0918423470 Member Posts: 159
Hello,
I have trouble when i uses filter for "Row No" in Acc Schedule.

Assuming, i have the list of rows bas below :

RowNo

10
11
12
15
20
22
30
50
70
90
100
120
200
300
305
310

when i uses F7 for "Row No" like "30..50" and the result :
30
40
50
300
305
310

It's wrong result. ](*,)

This pb happens only in NAV SQL option , i did the same way in NAV Database server , it's ok (30,40,50).

Anybody had this pb?? and do u know about the reason?? and can we fix it or not??

Thanks.

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    I think the only solution is to use row no;s that have the same length like

    100

    150

    200

    300

    ...

    850

    900

    And not use <100 and >999
  • S0918423470S0918423470 Member Posts: 159
    Um,

    Thank you for your suggestion :D

    But i want to know why this pb happens?? and you try to do like i do?? and the result is the same?? Pb is only in SQL Server option.

    It' so strange ??? #-o
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    It has something to do with SQL sorting v.s. C/side sorting. C-side sorts like

    1
    2
    3
    10
    11
    12
    20
    30

    Independent of the length

    SQL Sorts like

    1
    10
    11
    12
    2
    20
    3
    30

    ...
  • PoweRoyPoweRoy Member Posts: 43
    aka string sort
    maybe u can set it to numbers

    or as stated above, use number with the same length

    001
    |
    999
  • MogensMogens Member Posts: 10
    Row No. is a Code field, so SQL will sort this in alphanumeric order.

    You can change the field property "SQL Data Type" to Integer in Table 85 Field 3 to have the Row No. sorted numeric.
    Remember that this is only possibly if there is only numeric data in this field.
  • kinekine Member Posts: 12,562
    Main rule for using numbers in Navision:

    Never use the plain 1,2,3,10 etc...

    everytime use the code with same length - it means 0001, 0002, 0010 etc.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.