How to sql subquery into Alteryx workflow
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Team,
when we execute this sql code we get the result that we should do in alteryx ,by using tools we should prepare the workflow to create below subquery,
###code:
SELECT
HZ_RELATIONSHIPS.OBJECT_ID||'~'||HZ_CUST_ACCOUNT_ROLES.CUST_ACCOUNT_ROLE_ID||'~'||1 CUSTOMER_CONTACT_KEY
,HZ_CUST_ACCOUNTS.CUST_ACCOUNT_ID
,HZ_RELATIONSHIPS.OBJECT_ID CONTACT_PARTY_ID
,HZ_CUST_ACCOUNT_ROLES.CREATED_BY CREATED_BY
,HZ_CUST_ACCOUNT_ROLES.CREATION_DATE CREATION_DATE
,HZ_CUST_ACCOUNT_ROLES.CUST_ACCOUNT_ROLE_ID CUST_ACCOUNT_ROLE_ID
,HZ_CUST_ACCOUNT_ROLES.LAST_UPDATED_BY LAST_UPDATED_BY
,HZ_CUST_ACCOUNT_ROLES.LAST_UPDATE_DATE LAST_UPDATE_DATE
,HZ_RELATIONSHIPS.PARTY_ID PARTY_ID
,HZ_RELATIONSHIPS.RELATIONSHIP_ID RELATIONSHIP_ID
FROM HZ_CUST_ACCOUNT_ROLES,
HZ_RELATIONSHIPS,HZ_CUST_ACCOUNTS
WHERE 1=1
AND HZ_RELATIONSHIPS.SUBJECT_ID=HZ_CUST_ACCOUNTS.PARTY_ID
AND HZ_RELATIONSHIPS.PARTY_ID=HZ_CUST_ACCOUNT_ROLES.PARTY_ID
AND HZ_CUST_ACCOUNTS.CUST_ACCOUNT_ID=HZ_CUST_ACCOUNT_ROLES.CUST_ACCOUNT_ID
- Labels:
- Demographic Analysis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
A question!
if putting all this sql code inside an inout or indb input tool does not meet your need.
or do you really want to make separate consulates due to the database being different and break each query into a tool and do the join?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for Reply
yes,want to make separate consulates due to the database being different and break each query into a tool .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
 See below if this helps. The non-highlighted portions will be fields in the select tool after the input and joins. Ignore the "where" as it isn't necessary.
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@saraswathireddy I can't tell from your image since we don't see what's happening in the tools. Is your output not getting what you need?
