BAQ across two environments

A quick question to see if it is possible? We have our Live DB and an E9 Archive on the same server, could you do a BAQ that looked at parts in our Live environment and then pulled if available any Lot History from the Archive?

I’m going to assume you’re on-prem. It’s possible, but could potentially be ugly.

You’d want to use an external BAQ to access the archive database, but the complexity kicks in if you also want to use tables from the live database. If you can get away with just querying lot history in the archive, that’ll be quick and easy. Including results from live would need a little more work.

I think it will be from both if i have understood the question correctly.

IF you can, create another database on the server - we call ours “Utility”. We wrote a number of Stored Procedures, Functions and Views in that database because of early Epicor query limitations. Each of these can access multiple databases/tables/etc. at one time. It’s your FULL query, but outside Kinetic. Then you can use one External BAQ from Kinetic to reach out to the data you need (SP/View).

If you have the SDK you have the options of doing the same inside the Kinetic database.

Another option (if this is just a one-off thing and doesn’t require an entire DB) could be to create a view in the archive DB if it’s just read-only anyways. You could do it in live, but that comes with all the risks (deletion during upgrade, naming conflicts, no official Epicor support, etc).