Sometimes I want a sanity check before I click Test or GetList in a BAQ so I copy the Query Phrase into SSMS and run it. Or I might modify it in SSMS add fields or other logic before I go back and change anything in the BAQ. Except when I paste it, I have to redo the joins on tables that have UD fields because obviously SQL Server knows that the UD fields are not in the same parent table as Query Phrase suggest.
Sure it might clean up the phrase but I’d rather have valid SQL that I can use.
For every UD table you add Epicor creates a view in the DBO schema which is a join of the two tables with the same name that’s how the “magic” happens and how come you don’t have to have 2 tables referenced everywhere. #LookingUnderTheHood