Nice description Razzak, To really speed things up on a large database (since loading data after the indexes exist is a lot slower) 1. Add "RUN dbname_data.dat" in the dbname_structure.str file just before the first CREATE INDEX statement 2. Now RUN dbname_structure.str and the whole process will complete in record time.
Best Regards, Dennis McGrath -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak Memon Sent: Friday, August 08, 2014 10:45 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: multi column change At 11:17 AM 8/8/2014, jan johansen wrote: >I need to change a number of columns with the same name from REAL to DOUBLE. > >I know that I have done this before. >If I remember correctly you unload the structure and data separately, >search for and modify the structure file for the new data types, >run the structure file, run the data file, and then check your work. > >Does that sound about right? Jan, There are several techniques to accomplish such task at hand. However ... The eloquent method is to UNLOAD the STRUCTURE, carefully edit the file as deemed necessary, and then re-build the whole database with updated column definitions. Here's how ... -- A very simple example CONNECT dbname OUTPUT dbname_structure.str UNLOAD STRUCTURE OUTPUT SCREEN OUTPUT dbname_data.dat UNLOAD DATA OUTPUT SCREEN DISCONNECT RENAME dbname.rx? dbname_backup.rx? RBEDIT dbname_structure.str -- use Find Text (Shift+F8) to search and update the column data type -- save the file. RUN dbname_structure.str -- if everything was updated and corrected accordingly -- that should re-build a new database with corrected schema -- If any errors -- correct 'em accordingly and start over -- Use TRACE dbname_structure.str to step through the whole process RUN dbname_data.dat -- that should re-load the data, forms, reports, labels, etc. The alternative method is to use the RENAME COLUMN, ALTER TABLE ... ALTER COLUMN routines. This will require a complete knowledge and list of all tables, columns, Indexes (if any), associated COMPUTEd Columns (if any), etc. Hope that helps! Very Best R:egards, Razzak. www.rbase.com www.facebook.com/rbase -- 31 years of continuous innovation! 16 Years of R:BASE Technologies, Inc. making R:BASE what it is today! --

