HPE Service Manager / Service Center Support and News Forum
Showing results for 
Search instead for 
Do you mean 

Convert a structured array from a m1 to a1 table.

Frequent Advisor

Convert a structured array from a m1 to a1 table.

We have SM 9.30 running on SQL 2008.  We have several Structured Array's in several dbdict's that are currently mapped to the sql "m1" table as an "IMAGE".  What we would like to do is to convert the structured array out of the m1 table as an array into an a1 table with distinct fields in SQL.


Is there a set procedure for performing such an action? 


Thanks in advance,


Honored Contributor Honored Contributor

Re: Convert a structured array from a m1 to a1 table.

I don't think there's a set procedure. Personally, what I'd do is create a new structured array with your new fields, then mass update the records through the tool, then rename the fields. I don't think it works to simply remap the fields.


For example, if you've got:

all.status array IMAGE m1

all.status structure

approval character

desc character

status character

level character

date date/time


I'd make a new structured array:

all.status.new array a1

all.status.new structure a1

approval.new character a1

desc.new character a1

status.new character a1

level.new character a1

date.new character a1


Then mass update the records using Complex Update like:

all.status.new in $file = all.status in $file


then, after that is complete, rename the original fields and add .old to the end, and then rename the .new fields to get rid of the .new


I think that's the best way - you don't run the risk of losing your data if something goes wrong.