We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Discussions

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

In DB Sql Query in Query builder

praneshsapmm
8 - Asteroid

Hello there,

 

Can someone help me to build query for the below requirement in query builder in Connect In DB tool . 

 

Table name : Inn_table 

if field_1 = 'A' 

then select  field_1 ,field_3,field_4 

 

I do not need all columns to be selected.

 

Thanks

1 REPLY 1
BrianR
Alteryx
Alteryx

Hi @praneshsapmm, note that there's a few choices for you in the query builder window to build your queries...you can build the specified query via the Visual Query Builder for example by selecting the fields field1_, field_3, and field_4, and then in the Criteria box for field_1, you would enter A. Then to double-check, you can switch over to the SQL Editor window and it should show your query, which will look similar to this:

 

select Inn_table.field_1, Inn_table.field_2, Inn_table.field_3

from

Inn_table

where Inn_table.field_1 = 'A'

 

There might be slight differences depending on your database...in my case, I'm using SQL Server, and the syntax above is what I would see in my SQL Editor window.

Labels