Wondering how to integrate SQL into your JDA RedPrairie MOCA programming? Here are a few tips.
Have a specific question or challenge? Try searching below or speak with an expert through our chat bot.
MOCA Supports SQL Server and Oracle
If you know SQL Server or Oracle SQL, you have a good start on learning to program MOCA. The latest versions of MOCA script support a combination of C syntax, SQL, and Groovy (Java). MOCA also supports compiled code execution as well. The primary benefit of MOCA’s database layer is dynamic translation. RedPrairie originally supported Oracle. When the application was converted to support SQL Server, a translation layer was added that could handle 95%+ of the logic conversion BEFORE transmitting to the database engine. What this means for developers is that a MOCA statement like the one below will be translated automatically if executed against a WMS instance running on SQL Server.
[SELECT NVL(test, 1) test from test_table]
[SELECT ISNULL(test, 1) test from test_table]
How can I learn the database tables in JDA RedPrairie WMS?
WMS has many tables, but if you learn how to read MOCA traces and memorize the primary relationships in the system, you can get up to speed fairly quickly. When getting started in JDA RedPrairie WMS support (or learning a new version), some of the most useful MOCA commands are:
list user tables – returns a list of all tables and views in the JDA/Red Prairie database.
list tables with column – accepts a column name and then returns a list of all tables that have that column included
list table columns – accepts a table name and returns table definition with primary key fields and column comments/descriptions
Hopefully these tips help you get started on your JDA RedPrairie journey! If you need some more detail or would like to arrange training through your company, please contact us or chat with us about it!