Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
Break the contents of an OIC variable in lines to insert it into a database — Cloud Customer Connect
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

Received Response
16
Views
1
Comments
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!