Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How to delete a field in SQL without effecting NAV

Posted on by Microsoft Employee

We created two fields in 37 Sales Line Table.
And then we deleted them because we are not using those two fields. But these two fields are updated in SQL Server.  That's why we faced "Null value in SQL not allowed for those two fields".
Thus we added those two fields in 37 table again,,Now it is showing
"The following SQL error was unexpected. Column names in each table must be unique. Column name in table is specified more than once."

Table is not compiling and ales Orders stopped. Can anyone suggest what to do...

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to delete a field in SQL without effecting NAV

    Where do you executing this code in? I would like to delete a field as well.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to delete a field in SQL without effecting NAV

    Issue Solved!!

    We deleted the columns in SQL by executing a code

    USE <DATABASE NAME>

    GO

    ALTER [<TABLE NAME>]

    DROP COLUMN [NAME];

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans