I am using MSSQL and I have legacy data that I want to bring into Aware so here is my plan:
1) Create a new BO using the persistence External (which will retrieve all of the columns)
2) Create a 2nd BO the same way, then change the Persistance back to AwareIM. Now I have 2 objects with the same structure.
3) use a process to read all of the rows in the external table and insert them into the Aware table.
so, my question is, what is the most efficient syntax (or even the 2nd most efficient one, since I am a NOOB) to do this?
Thanks
Bruce
Copy all data from one BO to another one
Re: Copy all data from one BO to another one
Bruce, I've put together this PDF, gathered the info from User Guide in one place related to CRUD Actions. It can help you decide what direction to go.
- Attachments
-
- Actions in Aware.zip
- (228.29 KiB) Downloaded 574 times
-
- Posts: 2431
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Copy all data from one BO to another one
Hi Bruce,BLOMASKY wrote:I am using MSSQL and I have legacy data that I want to bring into Aware so here is my plan:
1) Create a new BO using the persistence External (which will retrieve all of the columns)
2) Create a 2nd BO the same way, then change the Persistance back to AwareIM. Now I have 2 objects with the same structure.
3) use a process to read all of the rows in the external table and insert them into the Aware table.
so, my question is, what is the most efficient syntax (or even the 2nd most efficient one, since I am a NOOB) to do this?
Thanks
Bruce
I would do it a similar way for Item 1 & 2
But, then I would remove the Attributes from the new Aware BO that you no longer need.... such as superfluous keys or indexes that were only there because you needed them in your old environment.
OK.... Legacy BO is called Legacy, New BO is called AwareData
In a process...
FIND ALL Legacy
CREATE AwareData FOR EACH Legacy WITH AwareData.Attribute1=Legacy.AttributeJ, AwareData.Attribute2=Legacy.AttributeK, AwareData.Attribute3=Legacy.AttributeL,etc etc
Leave out any Attributes that are unimportant
It does work..... Just tested it.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Re: Copy all data from one BO to another one
1st Ben, thank you, that is very useful.
2nd, Mark, if the attributes have the same name, is there a way to just insert the records and have aware match them?
Bruce
2nd, Mark, if the attributes have the same name, is there a way to just insert the records and have aware match them?
Bruce
Re: Copy all data from one BO to another one
Instead of CREATE, Try DUPLICATE Legacy TO AwareDataBLOMASKY wrote:1st Ben, thank you, that is very useful.
2nd, Mark, if the attributes have the same name, is there a way to just insert the records and have aware match them?
Bruce
I haven't tried it yet, but give it a shot and let us know.
BTW Bruce, not sure you remember me. We used to talk over Magic issues back in late 80's (Magic 2.36, 3.5, 5.x). You were always funny, and had a voice that sounded you had a sinus cold...
Good to see you here
Re: Copy all data from one BO to another one
it seems like duplicate only works if all of the attributes match. and yes, I do always sound like my nose is stuffed.