Problem INCSTR in VARCHAR field with SQL

monteiro
Member Posts: 26
Hi all,
I have a problem using function INCSTR in a VARCHAR field with SQL database.
In a table the highest value ID (like a field "No.") is 11.000. When I use INCSTR in FDB returns 11.001. But in SQL returns 10.000. SQL considers 9.999 as the highest value.
Someone know how to fix this? Is a configuration in SQL?
Thanks in advance.
I have a problem using function INCSTR in a VARCHAR field with SQL database.
In a table the highest value ID (like a field "No.") is 11.000. When I use INCSTR in FDB returns 11.001. But in SQL returns 10.000. SQL considers 9.999 as the highest value.
Someone know how to fix this? Is a configuration in SQL?
Thanks in advance.
Monteiro, Rodrigo
www.draeger-medical.com
www.draeger-medical.com
0
Answers
-
Hello,
I found solution myself and would like to share: there is a property in some fields (the incompatibles with SQL, like CODE) called "SQL Data Type". This property has 3 options: Integer, Variant and Varchar (this is default).
In my problem, I needed use INCSTR in a CODE field, but works wrong. The highest number was 11.000, but was considered 9.999 (because VARCHAR is a text). So, I changed the "SQL Data Type" to Integer and then runs right.
But this works only if the CODE field has numbers (0-9). Unlettered.Monteiro, Rodrigo
www.draeger-medical.com0
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