Need help with simple select statement

I have a project that defaults to DB1 database.

I need to create a SQL statement that pulls data from DB2 connection.

SQL * DB2.MachineWorkOrders
Doesn’t work for me. What am I missing??

I am assuming DB1 and DB2 are the names of the connection documents within Ignition. I have also tried it with the hostnames to no avail. Always get an Invalid object name…

SELECT *
FROM DB2.dbo.MachineWorkOrders

Maybe?

You could create another datasource in Ignition that uses the DB2 database.