community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
We will be upgrading the Gallery to our 2019.4 release this Saturday, December 7th beginning at 9:00am MT. We expect the outage to take last approx. 2.5 hours.
SOLVED

Bring data connection Oracle database table name downstream

Asteroid


Hi all.  I have a data connection in which I have SQL code doing a basic select* from a PERSON table in my database.  I would like it to dynamically fill in the table name in my formula tool.  Currently, I'm entering the table name manually and it's a pain.  Any ideas?  I'm on 2018.2 if that matters.  Thanks!

 

TABLE NAME.jpg

Alteryx Certified Partner
Alteryx Certified Partner

Hi @summarizer 

 

You could add it to your query, I think this might work:

 

select *, 'PERSON' as TABLENAME from PERSON

 

Cheers,

Alteryx Partner

@summarizerWhy don't you add the Table name in your select statement (e.g. Select employee, id, name, 'person' as table)?

Asteroid

Thanks!  I am relatively new to SQL.  I wasn't even thinking about that!  Yep, super easy!  Thanks!!!

Asteroid

Yep, thanks John.  Feeling a very silly Weds afternoon "duh" moment.  Thanks for the advice!!!

Highlighted
Asteroid

And for the good of the order, I wanted to list what worked for me.  For my Oracle SQL, this was the correct syntax to create that column to the right of all the others.  I needed the table name (or alias like here) then a dot and the asterisk.  Thanks again! @Thableaus @john_miller9 

 

SELECT
PERSON.*
,'PERSON' as Table_Name
from
ORACLE_DATABASE.V_PERSON PERSON

Labels