Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Case Statement in Alteryx

Ashwin1
7 - Meteor

Hi All, 

 

How can i achieve this in Alteryx?


SELECT
case when A.table_name like 'Print%' THEN A.TABLE_NAME
ELSE ('PRINT_' || A.TABLE_NAME) END Table_Name
FROM Table A

 

Regards

Ashwin

2 REPLIES 2
RolandSchubert
16 - Nebula
16 - Nebula

Hi Ashwin,

 

in Alteryx, in a first step you select the fields you need using INPUT tool. The changes in field "TABLE_NAME" would be achieved using a formula tool

 

Column (= Field): TABLE_NAME

Formula: IF StartsWith([TABLE_NAME], "Print") THEN
                   [TABLE_NAME]

               ELSE

                    "PRINT_" + [TABLE_NAME]

               ENDIF

 

Best regards

 

Roland

 

Ashwin1
7 - Meteor

Thanks RolandSchubert

Labels
Top Solution Authors