infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
Insert into sql DB without overwriting
shikher arya1
I have a new requirement for my interface as follows:
I have a CSV batch file which will have multiple records for an MRN.
For ex:
|1|2018-05-30 11:31:22|K40.20||K40|2||MRN-1
|2|2018-05-30 11:31:22|Z41.2||Z41|2||MRN-1
I am using an iterate in my xlate which means each CSV record will go one by one to Outbound DB.
In the OB thread, there is a stored procedure created which is having delete records from DB based on the MRN & insert current records.
Now, the requirement is that, I need to delete all the existing records from the DB based on the MRN-1 & insert whatever new record comes in the CSV file for that MRN-1 even if it is more than one. In the above ex: I want both records in the DB to exist.
But, since, due to iterate, each record is going one by one, it is not inserting multiple records for the MRN-1, but overwriting it.
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Daniel Murphy
I think you may want to delete the records based upon the date in addition to the MRN-1.
Any record that is OLDER than 2018-05-30 will be removed but leaves the current date.