Suppose there is a column with data type number.
The current “data scraping” data is first inserted using the “insert” activity, and then the character type is updated to a numeric type using “excute query”.
What I want to do is not use “insert activity” but process it within “excute query” at once.
“update dayexrate_uipath
Set currency_id = Case
When currency_id = ‘USD’ then 1
When currency_id = ‘GBP’ then 2
When currency_id = ‘CAD’ then 3
When currency_id = ‘CHF’ then 4
When currency_id = ‘HKD’ then 8
When currency_id = ‘SEK’ then 9
When currency_id = ‘AUD’ then 10
When currency_id = ‘DKK’ then 11
When currency_id = ‘NOK’ then 14
When currency_id = ‘SAR’ then 16
When currency_id = ‘KWD’ then 17
When currency_id = ‘BHD’ then 18
When currency_id = ‘AED’ then 19
When currency_id = ‘JPY’ then 20
When currency_id = ‘EUR’ then 21
End
Where
currency_id In (‘USD’,‘GBP’,‘CAD’,‘CHF’,‘HKD’,‘SEK’,‘AUD’,‘DKK’,‘NOK’,‘SAR’,‘KWD’,‘BHD’,‘AED’,‘JPY’, ‘EUR’)”
100% right
but
I’m using data scraping to get the value from the website and insert it into the table, but I’d like to update and insert without using “insert activity” here, is this possible?
In “insert activity”, there is a separate “input datatable” property, but it does not exist in “excute query”, so how can I add data of datatable “dt_rr” in “excute query”?
With reference to the skeleton you gave us, we proceeded with “data scratching → exit query(select*) → for each row in data table → insert”, but it does not change(ex. USD → 1). Can you take a look?
In the switch statement, the existing CurrentRow (“current_id”).ToString.Equals(“USE”) Or CurrentRow(“currency_id”).ToString.Equals(“JPY”) … . … …
It’s not working. So,
CurrentRow(“currency_id”).Equals(“CAD”,“CHF”).ToString. I changed it like this. Is this a problem?