Hi alteryx team,
I want to insert a value in another column based on values. there is example which i am giving.
"if mat_group=005 update mat_group_name="CARBON"
"if mat_group=006 update mat_group_name="CHEMICAL"
can any one suggest me how to update the value based on group given and which tool will update it. I try multi row formula tool. but i failed to get answer.
Get answer asap. that will be very helpful.
Thanks,
Kaustubh
Hi @Kaustubh17
You can do it with help of a formula tool. Here is how you can do it.
Workflow:
Here is a helpful resource https://community.alteryx.com/t5/Interactive-Lessons/Writing-Conditional-Statements/ta-p/98910
If this is not the expected output can you provide some sample input and expected output it will help us get a better understanding of the usecase.
Hope this helps : )
Hi @atcodedog05
but implement based on Database, as 005 having a different DB and 006 having a different DB .
so, how we can write condition based on single value.
Thanks,
Kaustubh
I have to update those values in different DB. so let me know what query will update the value based on mat_group on single DB.
005 have different DB and we have to update all value to carbon only
basically we want to update all the value which have 005 mate_group change to mat_group name "carbon" that will we implemeted on single DB. all the value have 005 mat_group and we want the value which have 005, mat_group_name updated to carbon only .
Hi @Kaustubh17
If your data has a primary key what you can do is extract only the rows for which mat_group_name needs to be updated change it in the formula tool like above. Write it back using the output tool update option of db. This will update the data.
You can also explore in-db tools its similar to normal tools except it will execute the query on the SQL server.
https://community.alteryx.com/t5/Videos/In-Database-Workflows/td-p/330566
Hope this helps : )