Home > Forum > Database > Sql query to list all of the application

Sql query to list all of the application
0

HI
I need by sql query to outline the list of the appliacation that we have and a workflows to a choice field. How can I do if the app is on Main_Db and we have apps on Main_db and main_db2?

MVP

Hi,

if you have two databases and want to display all applications in one application you will require a custom MSSQL database connection.
This database connection will use a user, who can access both databases.

Then you could create you SQL query like:
SELECT 'Main db' as DatabaseName, [APP_Name]
FROM [Main_DB].[dbo].[WFApplications]
union
SELECT 'Main_DB2' as DatabaseName, [APP_Name]
FROM [Main_DB2].[dbo].[WFApplications]

If you have dev/test/prod environment with different database names, you could add a constant for Main_DB and MainDB2, which you could use in the query.

Best regards,
Daniel

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.