Multiple Sql queries linking
- 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
Dear All,
i am using multiple sql queries for my daily BAU, Here i am joining Query1 to Query2 , Query12 output im joining with Query3 same way for all the queries. Is there any way can i built same logic in Alteryx. Please find the below screen shot for the logic.
kindly help me.
Thanks & Regards.
Niru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Niru,
This could be achieved with a series of join tools in conjunction with union tools to create the relevant left and right joins whilst querying your database with the standard input tool:
I've attached my workflow for you to download if needed!
Kind regards,
Jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
H @Jonathan-Sherma, Thanks a lot for your reply, sorry for my late reply,
im pulling directly data from sql server. Here each table has millions of records. With Query1 matching records i need to pull data from other tables. Is there any way i can pull only matching from other tables without using join ( if I use join it is taking more than 4 or 5 hours to pull the data other tables).kindly help me
Thanks in Advance
Niru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- On the Create tab, in the Queries group, click Query Design.
- On the Design tab, in the Query group, click Union. ...
- Click the tab for the first select query that you want to combine in the union query.
- To combine two or more SELECT statements to form a single result table, use the set operators: UNION, EXCEPT or INTERSECT. ...
- To keep all duplicate rows when combining result tables, specify the ALL keyword with the set operator clause.
As you can see, joining three tables in SQL isn't as hard as it sounds. In fact, you can join as many tables as you like – the idea behind it is the same as joining only two tables. It's very helpful to take a look at the data midstep Find cheats for gun blood at Scream Reality and imagine that the tables you've already joined are one table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @ueyhdga, Thanks for your detailed reply,
i followed the same process to build the query, Here i got the unexpected result, im unable to validate my information.
Is there anyway I can include 1st query output in second query where condition. Please suggest me any other way.
Thanks in Advance
Niru
