Initializing NOT NULL fields?

megawavezmegawavez Member Posts: 133
edited 2008-10-09 in SQL General
Hi,

We are doing a data migration and I'm looking into using SQL scripts to copy the data over from the old database to the new one. In looking at the table definitions, it looks like Navision does not provide default values for fields, so if I do a SELECT INTO from another database, I'll have to provide a value for every field in the destination database (ie list out each field and set to '' or 0).

Does anybody know of a way around this? Maybe some tool to automatically populate NOT NULL fields with '' or 0?

Anyway, probably can't be done, but just wanted to ask anyway.

Thanks,
M

Comments

  • kinekine Member Posts: 12,562
    You can use the "Maintain defaults" option in File-Database-Alter-Integration to create defaults for all fields. Else you need to enter empty string or zero into each field.

    But, I hope that you know that not all data can be just "copied" from old DB into new one...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • megawavezmegawavez Member Posts: 133
    Thanks, exactly what I'm looking for!

    We'll definitely need to go back through the data, but this will greatly speed the migration process.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    megawavez wrote:
    Thanks, exactly what I'm looking for!

    We'll definitely need to go back through the data, but this will greatly speed the migration process.

    What version are you upgrading from/to.

    You may find that the time you save in getting the data moved is completely wiped out by having to completely re-write the update routines outside of NAV. Unless of course you are in a tight conversionwindow, and must do it out side of Navision.

    Good luck, and let us now how this progresses.
    David Singleton
  • megawavezmegawavez Member Posts: 133
    megawavez wrote:
    Thanks, exactly what I'm looking for!

    We'll definitely need to go back through the data, but this will greatly speed the migration process.

    What version are you upgrading from/to.

    You may find that the time you save in getting the data moved is completely wiped out by having to completely re-write the update routines outside of NAV. Unless of course you are in a tight conversionwindow, and must do it out side of Navision.

    Good luck, and let us now how this progresses.

    Upgrading from a heavily customized version of 2.6 (1400 modified objects) with it's own manufacturing module to Nav 5.0. I'm trying to get rid of as many customizations as possible.
Sign In or Register to comment.