BookmarkSubscribeRSS Feed
BrettRankin
Calcite | Level 5

Hi Everyone,

 

I wanted to know if we can connect to multiple databases using one odbc connection in the DataFlux tool.

This question was posed to me from an analyst who wants to query a parallel datawarehouse that uses tables from 2 different databases that are on the same server.   In his query, he would ndicate the database, schema, and tables in his 'From" statement...I believe he can do this easily in SAS but not sure if its the same in DataFlux.   Most times, we ask our analysts to indicate the database when setting up the ODBC connection in DataFlux...that is why I am asking.

 

Thanks for any help.

Brett

 

Select a.*

from database1.schema1.table1 a inner join

        database2.schema2.table2 b

on a.field1 = b.field1

1 REPLY 1
SASKiwi
PROC Star

I don't have a working Dataflux environment to check this out but one option you could consider is creating a table view in SAS based on a single ODBC SQL passthru query using multiple databases.

 

Dataflux can happily read SAS tables so I see no reason it could not read a SAS view.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 861 views
  • 0 likes
  • 2 in conversation