Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Integration / Customization
S3 Customization/Development
Add a new column to an existing table while retaining table data
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Kezia West
Past 24 Hours:
1
Prev. 24 Hours:
0
Overall:
5246
People Online:
Visitors:
483
Members:
0
Total:
483
Online Now:
New Topics
Infor CloudSuite
How to build a Pre-Prod tenant
2/7/2025 1:28 AM
After we finished our implementation and ended our
Lawson S3 Procurement
Browser issue with RQC Shopping
1/28/2025 5:49 PM
Since the recent Chrome/Edge updates, our RQC shop
Lawson S3 Procurement
S3-Procurement New Company
1/22/2025 10:38 PM
My Accounting Department has created a new Company
S3 Customization/Development
JUSTIFIED RIGHT
1/15/2025 7:41 PM
Is there a way in Lawson COBOL to make a character
S3 Systems Administration
ADFS certificate - new cert
12/3/2024 9:38 PM
The certificates on the windows boxes expired and
Lawson S3 HR/Payroll/Benefits
Post Tax Benefit Plan Table
11/14/2024 9:16 PM
Hi, totally new to Laswon. I have a repor
Lawson S3 Procurement
ED501 Error: Map 850 not supported by /law/c15vda/lawson/test10/edi/bin/laws_out_91
11/12/2024 3:47 PM
Tried runnning ED501 and getting the atathced erro
Lawson S3 HR/Payroll/Benefits
Error
11/6/2024 9:54 PM
When I try to enroll a retiree in 72.1 health plan
Infor ERP (Syteline)
Syteline: New Data Maintenance Wizard (Error) Need help
11/1/2024 4:24 PM
Hi, I need help with an error on syteline while us
Dealing with Lawson / Infor
Implementing Lawson v10 with Cerner Surginet, Case Cart Picking, and Quick Adds for the OR
10/29/2024 4:20 PM
Hi Everyone, I am wondering if there is any org
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1375
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Integration / Customization
S3 Customization/Development
Add a new column to an existing table while retaining table data
Please
login
to post a reply.
6 Replies
0
Subscribed to this topic
17 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
Woozy
Veteran Member
Posts: 709
10/15/2013 6:48 PM
I have a custom table that has been around for some time. The business has requested a modification which requires the addition of an additional column to the table. Can I make this change without losing the existing data in the table? If not, what is the best way to export/import the data that will work with a new table layout? By the way, I will be making the table change in DEV which will then be promoted to PROD. I'm most concerned that the folks who do the promotion are told what to do to make this work without data loss. Thanks for your help.
The.Sam.Groves
Veteran Member
Posts: 89
10/15/2013 7:10 PM
Split
The SQL statement to add a column to a table is: [code]ALTER
ADD
[/code] by default the add should not modify existing data in the table, however any existing rows will receive the default value you've defined (or not defined) for the column. However you may run into unintended consequences that a DBA may be required to assist you on when doing this. These can include things such as the table needing to be reorganized by the server to reallocate the space it was assigned and 'defragment' the table into a new space. Or am I misunderstanding the question?
Scott Perrier
Veteran Member
Posts: 39
10/15/2013 7:48 PM
Split
if the custom table is created with the lawson tools, then yes. Using DBDEF will allow you to add a column to the table. the blddbdict will create the table change file. Then the dbreorg will dump table in the old format and them load the table with the new column.
Woozy
Veteran Member
Posts: 709
10/15/2013 8:00 PM
Split
Thanks The.Sam.Groves and Scott Perrier, Since we are under managed services, so we don't have access to do a direct SQL alter...I'd be much happier if I could do it that way. I just wanted to be sure that the Lawson utilities wouldn't truncate the data. Scott - do I need to use a specific flag on the dbreorg to retain the data? Thanks!
Scott Perrier
Veteran Member
Posts: 39
10/15/2013 8:50 PM
Split
it depends on the parms selected but the default is safe mode which is what you want to do. dbreorg -S {productline} Usage: To reorganize a database. Syntax: dbreorg [-SCFYdin] [-W WFFile] {{-p DA} | PL} dbreorg [-lcs] {{-p DA} | PL} DA is DataArea and PL is ProductLine S - Safe mode (default). Dump data before altering db tables C - Conservative mode. Do not alter db tables F - Fast mode. Do not dump data before altering db tables Y - Yes. Do not prompt to continue in Fast mode (requires -F) d - No physical database exists i - Rebuild DataId dictionaries n - Do not run srgen p - Reorg just specified DA G - Do Garbage collection. If GCFile is not specified, reorg all files l - List files to be reorganized; no reorg c - Show file changes (requires -l) s - List number of records in the files (requires -l)
Scott Perrier
Veteran Member
Posts: 39
10/15/2013 8:55 PM
Split
a friendly reminder that once you alter the table in your Dev system, you can no longer cleanly refresh that table/data from production. It can still be done but takes some rework just like when the CTP install has a table change. It is best to refresh the table before you convert it, when possible.
Woozy
Veteran Member
Posts: 709
10/15/2013 9:15 PM
Split
Perfect. Thanks Much! Yep, we've run into the data refresh issue many times - mostly with new tables. Hopefully we can get the change in and promoted before the next data refresh. Fortunately, this is a very simple change. I appreciate your help!
Please
login
to post a reply.