Devide Existing entry Nos by 10

mustafaAlsoufi
Member Posts: 66
Hi everyone,
I'm trying to divide all the EXISTING Entry Nos by 10 as it reached the maximum limit(The range for 32bits is 2,147,483,648).
So by dividing all the existing Entry No. and by changing the incrementation from 10,000 to 1000, I would extend how many more lines I can add, which is about 10x.
My question is how can I divide the Existing Entry Nos and should I add the code in the table or somewhere else?
Thank you in advance.
I'm trying to divide all the EXISTING Entry Nos by 10 as it reached the maximum limit(The range for 32bits is 2,147,483,648).
So by dividing all the existing Entry No. and by changing the incrementation from 10,000 to 1000, I would extend how many more lines I can add, which is about 10x.
My question is how can I divide the Existing Entry Nos and should I add the code in the table or somewhere else?
Thank you in advance.
0
Answers
-
Also, please note that Entry No. is the only key in the table and I want to keep it that way.0
-
Hi,
there are a few things to consider
Is there a tabelrelatiuon from another Table?
Can all Entries divieded by 10 or are there entries like
10502
How long did it take to reach the full range of an integer (Is 10 enough or should it be an increment by 1)
Table.Reset;
Table.find('-');
repeat
Table2 := Table;
Table2.Rename(Table."Entry No." DIV 10);
until Table.next = 0;
If You can use SQL you can try someting like
Update Table
Set "Entry No." = "ENTRY NO:" / 10
OR
if you would like to renumber from the beginning
DECLARE @NewEntryNo int = 1
Update Table
Set "Entry No_" = @NewEntryNo
,@NewEntryNo += 1
Cheers Chris
0
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