Alteryx Designer Desktop Discussions

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

Understanding SQL Query to Alteryx

nitin_l
7 - Meteor

Hi, I am automating a bunch of SQL queries using Alteryx tool. I am trying to replicate the below query using Join and other tools. But I am not aware of  how to replicate "!" symbol in the below query into Alteryx. I have no experience in SQL

 

UPDATE [tbl_1] INNER JOIN [tbl_2] ON [tbl_1].[ID Number] = [tbl_2].[ID Number]

 

SET [tbl_1].[Min Amount] = [tbl_2]![Min Amount];

5 REPLIES 5
Samanthaj_hughes
ACE Emeritus
ACE Emeritus

Hi @nitin_l 

You will need to learn SQL to make your life so much easier I would recommend w3 schools for that. 

 

https://www.w3schools.com/sql/sql_update.asp

 

Here is a link to an update statement example. Its not about knowing what ! Is from your old location more along what you are trying to achieve. I.e  updating min amount from one table to the next. 

#Alteryxrocks
apathetichell
19 - Altair

what @Samanthaj_hughes said is true - but I think in this case - it's just a typo and is meant to be "." - this is looking at schema/db/.table syntax - standard syntax is "db/schema"."table" (or in BQ "table"."dataset" or in Snowflake "database"."schema"."table" - but you should get the idea) "." is the divider between objects.

 

having said that - there are some DBs (and some versions of some DBs) which do not support UPDATE - and Alteryx has different support for different databases...

Samanthaj_hughes
ACE Emeritus
ACE Emeritus

Also something to support more advanced SQL users especially if you have snowflake. That is writing up a temp table and using a MERGE statement to update those values which have changed. I love these get everything done in a fraction of the time. You need a primary key that doesn't change then all columns can be updated from your temp table of data you push up. This takes a bit of writing into your postSQL statements on an output tool. Happy to blog an example if needed.

#Alteryxrocks
Samanthaj_hughes
ACE Emeritus
ACE Emeritus

I'm curious to know if the statements are from MS Access. 😉

#Alteryxrocks
nitin_l
7 - Meteor

Yes @Samanthaj_hughes  . I just found out that "!" is not a typo but to refer a column of an Excel file added into the MS Access. Thanks for the inputs

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels