David Stein

Subscribe

Removing Null Country Values From the Syaddr Table

Unfortunately M2M does not automatically populate the Country field on many screens when a US State is selected. This can cause problems in reporting when an executive wants sales broken down by country and many of them are grouped under Null.

Anyway, if you want to see how many addresses are missing “United States” you [...]

Let’s Play the Orphaned Records Game

In the past couple of weeks, I have discussed the problems of orphaned records in the M2M Database and promised to provide a script to find them. So, I’ve decided to turn it into a game.

If you’d like to play, paste the following script into your Query Analyzer or SQL Server Management Studio and [...]

Orphaned Records and Technical Hypochondria

I found more orphaned records recently when querying a M2M table with an order by clause. Once again, this occurs because in my opinion the M2M database is not properly designed. Here’s a quick walk-through on how I found it. Incidentally, the screen shots are from TOAD using M2M’s practice database.

A manager tasked me with [...]

Using User Defined Functions to Suppress "Blank" Dates

As long as I have been working with the M2M Database I had always wondered one thing. Why on earth does M2M use 1/1/1900 dates? It’s fairly obvious that it was an artificial date when one wasn’t applicable, but why? Why not just allow your date fields to be null and be done with it?

For [...]

Solution to Encyclopedia Brown and the Case of the Data Corruption

This is a continuation from this previous post.

“It’s simple,” Encyclopedia said. “First I ran the following query against our database.”

SELECT SOM.fshipvia
FROM somast SOM
WHERE SOM.fsono = ‘123456’

“The value returned was UGB, which is the actual value for UPS Ground Bill in our database. So, I knew that the Ship Via [...]

SQL Script – Purchase Order Status/History (RPPSTA)

SELECT POM.fcompany AS [Vendor],
POM.fpono AS [PO No],
[...]

Work in Process (RPWIP) and Inventory Evaluation (RPIVAL) Reports

As I have time I will share the SQL queries derived from the more popular Made2Manage reports. After you have the SQL query, you can display it with any program you want such as Crystal Reports, ODBC Spreadsheets, or SQL Server Reporting Services.

Use the queries with caution and make sure that you always test [...]

Exporting Memo Fields to Excel. Received Goods (RPREGO)

One of my users came to me with a problem last week, and it’s fairly common. They run a M2M Report that has the data they want, but when they export it, some of the data is missing.

This can happen for a couple of reasons. Tables can be added to a report layout [...]

Dinner with a Ninja

I went home to Michigan over the Memorial Day Weekend. While I was there I had dinner with a SQL Ninja who I’ve mentioned before, Brent Ozar.

I met him almost exactly a year ago when I came across his blog. He had an excellent article on Perfmon, and I [...]

Cycle Counting Revisted

In a previous article, I mentioned the inadequacy of Made2Manage cycle counting in that you cannot track your cycle counts over time and make that data available to your users. Well, true to my word, I have created the following customization so that you can do just that. Now would be a good [...]

Page 1 of 212