Poll - do you use BAQ designer or SQL?

How do you PRIMARILY create and publish queries?

  • I make queries in SSMS and use External BAQs to use them in Epicor
  • I make queries in SQL somehow (SSMS, Notepad++, whatever) and then reverse-engineer my own work to rebuild it as a BAQ
  • I use BAQ Designer by choice even though Iā€™m smarter than that
  • I use BAQ Designer because Iā€™m on the cloud and I have to
  • I use BAQ Designer because thatā€™s all I know

0 voters

Count me in for the last one (BAQ is all I know).

Also, this was a good discussion that I read before this:

2 Likes

Option F) I use BAQ because Iā€™m too lazy to open another program.

2 Likes

You guys write so complex queries that they are hard to translate in tabular representation of Ice.Query* tables. And many parts of the system relies on that representation. So free form query is not an easy task to implement

4 Likes

Sure, Iā€™m not trying to resurrect the other thread. Iā€™m Mr. No Code.

This is just for curiosityā€™s sake. How do people think and design.

1 Like

All of the above and then some?

If I donā€™t need interactivity, Iā€™ll build a query, build a SSRS report around it, and push it to the server, and drop a URL link in the Epicor menu.

Half the BAQā€™s I create actually power some functionality (dashboards, UI drop-downs, BPMā€™s, REST calls) elsewhere in the system or wider environment. Sometimes I write a SQL query first to help me wrap my head around things since the BAQ designer isnā€™t very intuitive.

Iā€™ve written one external BAQ, and that one just references the E10 db itself and I built it entirely in the BAQ designer. I did it because it was so complicated (multiple subqueries, maybe 2 dozen tables in all) that the system load of all the permission checks was bloating the update time to 10 seconds. External BAQ bypasses that and cut the refresh down to 1.5 seconds.

Iā€™ve also recently learned LINQ, which is SQLā€™s dimwitted cousin living in C# land, and that is an extremely useful query language that has made some BPMā€™s quite feasible that previously were not worth the effort.

2 Likes

Right - but I assume thereā€™s another point in there. Are you saying that in order to accomplish the other functions, you are forced to use BAQ Designer?

I never use External BAQs, so I donā€™t know how they play with others.

Not at all. Theyā€™re just the most convenient option. I mean, itā€™s hard to avoid BAQā€™s if you want to build a dashboard, but youā€™re not really forced to use Epicorā€™s dashboards, are you?

1 Like

Depends on the task at hand. Both incredibly valuable tools and one should use the right tool for the job.

1 Like

I was told that Epicor has a way to register a SQL View with the BAQ Designer, and you can free form the SQL Viewā€¦ This was before the King of BAQ left Epicor, he said itā€™s complete - just no User Docs exist on how to Register it.

Im still waiting on @Patrick.Ferrington to share just for us nerds, some info on this hidden feature :slight_smile:

DISCLAIMER:
It should not replace BAQ and should probably only be used in a ā€œMy Query is so complex I need to do it this wayā€ scenario.

BAQ Designer has been pretty darn good, in 2022.2 they also added UNPIVOT

4 Likes

Yeah, Iā€™m not going to make another poll, but maybe I should have allowed multiple selections. Might have been a better picture of what people do. Iā€™m just wary of giving people too many options to choose.

1 Like

what this means - you can create view in the DB, add it to zdata and BAQ will see it in table list.

4 Likes

OK, spoiler alert so far, there are no votes for ā€œI make queries in SSMS and use External BAQs to use them in Epicor.ā€

Granted I asked what is your primary tactic, but does anyone do this at all? (@jtownsend said once ever)

I am sure @josecgomez does this :slight_smile: He showed me his huge extBaq once, it was impressive.

1 Like

This here will help a bit in the near future :slight_smile:
https://epicor-manufacturing.ideas.aha.io/ideas/ERP-I-158

5 Likes

I dont have a good way to show thisā€¦ But I have one BAQ Query, completely built using the BAQ Designer that spans multiple pages when pasted into Word.

Including a VIN Year Decoder:

I have more complex ones, they run all under < 10 seconds. Definitely alot of Respect for the folks at Epicor who built the BAQ Designer.

There are alot of tricks folks donā€™t know about that the BAQ Designer lets you do. Recursive CTEsā€¦
Being able to do Expressions in the JOIN or even running a SubQuery etcā€¦
image

6 Likes

OK right spot ot reply - Yeah I planed on responding then Olga was on PTO my DBA didnā€™t remember doing this and then I forgot :frowning:

3 Likes

thank you and you are welcome :grinning:

3 Likes

@Olga is right we use external BAQs a LOT. We replicate our Epicor DB into an Azure SQL Instance (transaction replication / real time) and we write a lot of BAQs using this external DB

Mostly to bypass the Territory and Company restrictions in Epicor that while useful sometimes cause incredibly painful issues and the way they build this in is by appending a bunch of CTEā€™s and on the fly views to any query you execute which can cause performance issues.

But Yes we have a lot of External BAQs though I will say @JasonMcD we donā€™t write VIEWS and then pull them in as external, we use the tables as they are in the external baq. There is one exception to this and that is we create a view that Splits SalesRepList into a table because

storing~shit~like~this~is~f*cking~stupid

So we have 3 views InvcHeadByRep, OrderHedByRep andā€¦ ProjectByRep which gives you one row per rep and their split %

6 Likes

Letā€™s not forget Updatable BAQs, you can mess with the BPMs in the UBAQ or you can use Expressions properly :slight_smile:




Who said Dashboards cant send over RowMod and handle Delete :balloon:
image

2 Likes