Topic: Space in Itemnumber

Hi,

I have a customer where during the import itemcodes with a space in it came in the DB.

I want to change that by taking the spaces out of the itemcodes in the following tables

item_codes -- fields item_code and stock_id
loc_stock -- fields stock_id
prices -- fields stock_id
sales_order_details -- fields stk_code
stock_master -- fields stock_id
stock_moves -- fields stock_id

The itemcode without the space is unique.

Question:
If I disable the foreign key, change all tables and enable the foreign key again will this do the job?

Kind regards,
Jan

Re: Space in Itemnumber

Yes, but beware of changing the changed ones. Better make a separate dummy field in each table and sequentially replacing where it is NULL and then dropping the original column, renaming the dummy column to the original column and then enabling the foreign keys when all the tables are done.