-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchapter8.amp
More file actions
26 lines (22 loc) · 1.17 KB
/
chapter8.amp
File metadata and controls
26 lines (22 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
%%[
/* Set the name of the data extension to be used */
set @dataExtensionName = "My_DataExtension"
/* Initialize variables for search criteria and columns to be updated */
set @search1Column = "{{column1}}" /* The column used for searching rows to update */
set @search1Value = "SomeSearchValue" /* The value to search for in @search1Column */
set @noOfColumnsToSearch = 1 /* Number of columns to search in the data extension */
/* Initialize variables to with updated values */
{{#columns}}
set @{{Updatecolumn}} = "{{UpdateValue}}"
{{/columns}}
/* Update data in the specified data extension */
/* The UpdateData function updates rows in the data extension
where the search criteria are matched */
set @isUpdated = UpdateData(@dataExtensionName, @noOfColumnsToSearch,
@search1Column, @search1Value,
{{#columns_comma}}"{{column}}", @{{column}}{{/columns_comma}}
)
/* Output the result of the UpdateData function */
/* The function returns 1 for success and 0 for failure */
Output(v(@isUpdated))
]%%