How do we delete a table completely from a database?

jimmyliew1997
Member Posts: 3
I have a table containing some records, and this table need to be remove completely from the database. How can I do so?
0
Best Answer
-
"Then I need to copy all the existing data from Table A to Table B"
For this use TRANSFERFIELDS if table B is a copy of A. Otherwise copy all values individually.
Jimmy if you dont explain in details what you need it will be hard to help you
Make one simple example like TableA.No, TableA."Line No." then copy to TableB.Code, etc....1
Answers
-
you can delete it from the development environment or sql but wouldnt recooment it unless is custom table. Otherwise it might contain functions used by reports/pages/condeunits which you would need in general!0
-
using your test database, you could delete the table from object designer, then compile all objects to detect if any relationship was broken after deleting the table.0
-
I am sorry I did not fully put in what I am asking for. I meant to do it via AL Coding in Visual Studio Code instead of Dynamic Development Environment. What I need is, from Table A, I added a new field call newField. Then I need to copy all the existing data from Table A to Table B in order to change the primary key and fill the data in to the newField automatically as well.
Take note that: The newField is the new primary key.0 -
"Then I need to copy all the existing data from Table A to Table B"
For this use TRANSFERFIELDS if table B is a copy of A. Otherwise copy all values individually.
Jimmy if you dont explain in details what you need it will be hard to help you
Make one simple example like TableA.No, TableA."Line No." then copy to TableB.Code, etc....1 -
After that, can I know how do we delete the Table A? Since Table B is now permanent in the database and will using and Table A will not be using anymore.0
-
ahhhh now I know what you want to achieve
that is tricky indeed !!!
the answer is on the launch.json file
when you use the Recreate option it will erase all data for all tables used for your extension
if you are in development phase, lucky you, just rebuild all
but seems like you have a live scenario, where you want to copy all data to different tables, and then rebuild solution and move data back to original tables.
if you need my help i might be able to help you, skype me joao.bagdonas0 -
[Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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