Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Break the contents of an OIC variable in lines to insert it into a database

edited Apr 8, 2019 1:44PM in Integration 1 comment

Summary

Break the contents of an OIC variable in lines to insert it into a database

Content

Hi everyone,

 

I have created a variable in OIC where it stored the contents of a file, for example:
varoic = "METADATA | Location | SetId | SetCode | ActiveStatus | LocationCode | LocationName | AddressLine1 | Country | PostalCode | EffectiveStartDate
MERGE | Location | 0 || Active | LocationTest_22032019 | RESTAURANTE_Location22032019 | Jaime Balmes AvenueI Secc, 11550 Miguel Hidalgo, CDMX | MX | 11550 | 1951/01/01

MERGE | Location | 0 || Active | TLocationTest_23032019 | RESTAURANTE_Location22032019 | Jaime Balmes AvenueI Secc, 11550 Miguel Hidalgo, CDMX | MX | 11550 | 1951/01/01
"

when I insert into the database what I'm looking for is to take only the files that start with MERGE, so in theory I should create only two records in the table.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!