Trailing spaces on field type CODE?

Joriske
Member Posts: 7
We have a database (codepage Polish_CI_AS).
In the Table [VENDOR], the field "NO_" is setup to be CODE-type.
However, for some reason, the trailing spaces are NOT deleted (as I believe should have happened to fields of this type)
1. How come Navision did not deleted those spaces? (I supose every record has been created using copy/paste)
2. In order to make proper exports using export-to-excel functionality, how can I prevent the situation excel seeing/interpret this spaces as seperators? (At this moment, single table lines where these vendor numbers are used, will be exported to excel as multiple lines - which seems normal to me in this case)
Is there a way to automaticly update ALL the vendor-n° fields (in all diferent tables, so we will not disturb current relationships)?
TIA
In the Table [VENDOR], the field "NO_" is setup to be CODE-type.
However, for some reason, the trailing spaces are NOT deleted (as I believe should have happened to fields of this type)
1. How come Navision did not deleted those spaces? (I supose every record has been created using copy/paste)
2. In order to make proper exports using export-to-excel functionality, how can I prevent the situation excel seeing/interpret this spaces as seperators? (At this moment, single table lines where these vendor numbers are used, will be exported to excel as multiple lines - which seems normal to me in this case)
Is there a way to automaticly update ALL the vendor-n° fields (in all diferent tables, so we will not disturb current relationships)?
TIA
0
Comments
-
1) trailing spaces comes probably from some direct write into sql database without going through the client.
2) :-k the same thing happened to me on "non-Primary key" fields, and i've solved it with a simple VALIDATE(myfield)/MODIFY, if i remember correctly. Your case is more tricky instead...
try to do a RENAME on one of your vendor codes; if you're lucky, nav will understend what to do on his own...but i'm just guessing, give it a try0 -
Hello,
I may just add that I've experienced the same/similar issues in some customers databases. The issue in my case was always caused by Copy & Paste of the Cell value from Excel to NAV. In Excel there has been some trailing new lines that were not trimmed. Actually users didn't insert those records with incorrect new lines in the end "manually" - they have simply filtered for the value they copied from Excel and therefore the new record with the trailing new lines were created. (I should add the comment this was in the Classic client). This way I have ended with -except for whitespace - the same primary keys in Vendor tables which was later causing us the issues in the OLAP cubes as these are trimming the whitespace in the keys nicely ...
Actually I would prefer for the Code fields all the whitespace to be trimmed from the end, not only the spaces ...
Regards
Igor0 -
Step #1:
Train users not to copy/paste cell values from Excel.There are no bugs - only undocumented features.0 -
This is certainly a copy from Excel issue.
In Excel, press F2 while in the cell and highlight the cell content then Ctrl-C.1
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