Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to delete existing data from MySQL Based On New TFileInput

I want to create a flow, before inserting datasource(csv/xls), i want delete record in existing database MySQL based on month of column 'period' from datasource(csv/xls). The data type of column period is "yyyyMM".

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi
Read the period column with string type from the input file and pass it to tMysqlRow as parameter for deleting data, eg:
tfileinputDelimited-row1-tFlowToiterate--iterate--tMysqlRow

on tMysqlRow:
"delete from tableName where period>='"+(String)globalMap.get("row1.period")+"'"

Regards
Shong