I am in the process of trying to import data from a CSV file and add it to a relational database. In the CSV file there are two columns that are as following:
I am wanting to create a flag that would verify that the actual approver was in approvers list column. Below is an picture of what a final table might look like.
Below is how it is done in SQL with Sample Data.
Create Table #Temp
([List_ofApprover] nvarchar(135),
[Approvers] nvarchar(125));
INSERT INTO #Temp VALUES
('bgates,sjobs, or tcook','sjobs'),
('mduncan','mduncan'),
('mcook,jdavis, or hsmaith','mdavis'),
('triddle,hpotter','hpotter'),
('martha & Marry','martha'),
('martha & Marry','marry')
Select *
,CASE WHEN [List_ofApprover] LIKE CONCAT('%',[Approvers],'%') Then 'Yes' Else 'No' End [Approver in List]
From #Temp
I created some sample data in Alteryx and attached the flow file. Does anyone have a good suggestion to help me create this flag in my Alteryx workflow? Thanks in advance for all of the help.
Solved! Go to Solution.
@FUB_IA_SQL_GUY - A formula with
IF Contains([List of Approvers],[Approver]) then "Y" else "N" end
should work
Just name the field in the Formula Tool "Approver in List" and you should be all set
I didn't realize it was that simple, wasn't sure if wildcard needed to be used. Thank you for the help.