Category Archives: SQL Code

SQL Command Shell Extract Sample

    This was an extract using the command shell that extracted table data to a text file on the file system on the server.   /* AFS Feeds */ /* AFS Business Unit Feed – Command Shell */ EXEC … Continue reading

Posted in SQL Code, Uncategorized | Leave a comment

Backup Selected DBs

Posted in SQL Code | Tagged , , , , , , , | Leave a comment

Exact MAX Training – Finding Hidden Characters in your Data Using Dynamic T-SQL

Finding hidden characters in your data using Dynamic T-SQL On occasion you may have run into a situation where you have had extended ASCII characters in your DB fields. They could be from old data conversions or from various problems and … Continue reading

Posted in SQL Code | Tagged | Leave a comment

SQL Splitting Lines Code for Take a Long String and Wrap Width – MAX Sales Order Notes Table Example

First create the Function below. Next, run the query against your source DB, be sure to change the parameters so you get the length you want. This was used on a migration from MAS200 to MAX where the Sales Order … Continue reading

Posted in All Articles, SQL Code | Tagged , , , , , , , | Leave a comment

Configuring BOM Sequence Numbers in MAX, Code, Reports and Non-Zero, Effective Dates

A common request I get from customers is the need to sequence their parts on Pick Lists and in Engineering Reports. MAX sorts by the default Primary Clustered Key PRTNUM_01 (Part Master) or PARPRT_02 in the Product Structure. You can … Continue reading

Posted in SQL Code | Leave a comment

Using SQL Except to Query Part Routings in MAX

The other day I had a customer ask me for a query that would find Part Routing records the did not include a specific workcenter. I provided this snippet to help. This query selects the set that includes both(or all … Continue reading

Posted in SQL Code | Tagged , , , , | Leave a comment

MRP Command Line Batch Sample with Log File

1) Open the txt file and edit the file as needed. 2) Rename the sample file to .BAT. 3) Copy to the Server and place in the \EXACT\RMCLIENT\EFW folder 4) Enter a Scheduled Task in Windows to run it. MRP

Posted in SQL Code, T-SQL Sample Code | Leave a comment