SQL: Querying Microsoft Great Plains ? Overview for Database Administrator/Developer


Looks like Microsoft Great Plains becomes more and more popular, partly because of Microsoft muscles behind it. Now it is targeted to the whole spectrum of horizontal and vertical market clientele. Small companies use Small Business Manager (which is based on the same technology ? Great Plains Dexterity dictionary and runtime), Great Plains Standard on MSDE is for small to midsize clients, and then Great Plains serves the rest of the market up to big corporations. There are several reporting tools available and you definitely need to know which one to use for different types of reports.

If you are database administrator who is asked to import some data to Great Plains or repair or copy data from one company to another ? read this and you will have the clues on where to look further.

1. Microsoft Great Plains Tables Structure ? Launch Great Plains and go to Tools->Resource Description->Tables. Find the table in the proper series. If you are looking for the customers ? it should be RM00101 ? customer master file.

2. DEX_ROW_ID. This is identity column and each Great Plains table has it - this is due to the Great Plains Dexterity technology. This column is never used as a key field - so don't try to link your tables on DEX_ROW_ID. In case if you need to transfer the table from one company to another you should use these queries:

select * into GL00100_BAK from TWO.dbo.GL00100
go
alter table GL00100_BAK drop column DEX_ROW_ID
go
insert into GL00100 select * from GL00100_BAK
go
drop table GL00100_BAK

The set of queries above will transfer GL00100 (Account Master table) from TWO company into your current company. Then you need to run Checklinks - refer to GP Manual - in order to recreate the rest of the account master related tables.

3. Do not modify the table ? sometimes it seems to be nice if you just append couple of extra columns to the table - like in IV00101 - inventory master file why wouldn't you just add couple of additional descriptions. If you do this - Great Plains Dexterity engine will fail reading all your items - due to the fact that DYNAMICS.DIC (main Great Plains Dictionary file) has exact description of all the tables and Dexterity uses it for reading and writing into the specific table

4. Feel free to create SQL views or stored procs. If you are helping your internal developers to create Crystal Reports - good SQL views are real help to them. Let me give you example, the view below will show work and historical SOP Invoices - then Crystal can just use it

create view SOP_WORK_HIST
as
select SOPNUMBE, CUSTNMBR, CUSTNAME, DOCAMNT from SOP30200 where SOPTYPE=3 and VOIDSTTS=0
union
select SOPNUMBE, CUSTNMBR, CUSTNAME, DOCAMNT from SOP10100 where SOPTYPE=3 and VOIDSTTS=0

The above view will show all the work and historical non-voided invoices (SOP Type = 3 stays for invoice)

5. Some repair / unlocking tips:

If you run query above against DYNAMICS database - it will unlock the user, who accidentally shut down the computer without logging off Great Plains:

delete ACTIVITY where USERID='JOHN'

Next one will unlock hanging batch:

update SY00500 set BCHSTTUS=0 where BACHNUMB = 'JULYINVOICES04'

Happy querying! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies ? USA nationwide Microsoft CRM, Microsoft Great Plains implementation and customization company, based in Chicago, Boston, New York, San Francisco, Los Angeles, San Diego, Phoenix, Houston, Dallas, Atlanta, and Miami and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, VB/C#.Net, Crystal Reports and Microsoft CRM SDK developer.

In The News:


pen paper and inkwell


cat break through


An Introduction to .NET Framework

.Net Framework is a platform or development environment to seamlessly... Read More

Hubris - Definition: Microsofts Passport

Before September of 1995, Microsoft ignored the Internet because their... Read More

ERP Consulting: Microsoft Great Plains Partner Future Directions

In the Clinton era the status quo was simple: you... Read More

Groupware: Answers the 5 Questions of Document Collaboration

Every organization which creates collaborative documents, whether they are budgets,... Read More

Microsoft CRM: Implementation, Customization, Support ? Consultant Overview

Microsoft Business Solutions CRM is present several years on the... Read More

Professional XP Style Icons in Software and Website Development

Using professional icons in your application or website can bring... Read More

Microsoft Great Plains Payroll Module Customization Scenarios

It is now common thing when large corporation selects mid-market... Read More

Five Steps to Rapid Development with TierDeveloper 4.0

Follow the steps below to quickly design, generate, and deploy... Read More

The End of Spyware?

The US House of Representatives has recently passed the "Spy... Read More

Ukraine: a Prospective Player on the World Software Outsourcing Market

The destruction of the Soviet Union about 15 years ago,... Read More

The Bluebird Project

The objective for Zandi Digital is to make available clever... Read More

5 Mac Security Tips You Can?t Live Without

So, you've bought a new Macintosh, and now you may... Read More

Behave, Word, Behave!

If you copy something from a Web site or elsewhere...... Read More

OEComplete ? A Personal Information Manager

OEComplete is a utility for managing the personal information of... Read More

ERP System of the Future: Database, Business Logic and Interface

We will base our prognosis on our Microsoft Business Solutions... Read More

Mozilla Vs. Firefox

For those who are unclear on the differences between the... Read More

Microsoft CRM ? Typical Customizations

Microsoft CRM was designed to be easily customizable. Microsoft CRM... Read More

Review on QuarkXpress 6.0

After almost two decades of existence, Quark has become the... Read More

Making The Decision To Automate Your Software Testing

Not every software testing project can or should be automated.... Read More

MSN Messenger Is A Sweet Way To Communicate

MSN messenger is a pretty cool invention. I mean I'm... Read More

Navision Attain Database access via C/ODBC in ASP.NET Application

Navision Software was purchased by Microsoft and now it is... Read More

Microsoft Great Plains eCommerce: overview for developer

Microsoft Business Solutions Great Plains was designed back in the... Read More

5 Time-Saving Tips in Microsoft Word

Whether you have used Microsoft Word for years, have just... Read More

Microsoft Great Plains Integration Manager: Using Continuum ? Overview for Developer

Microsoft Business Solutions Great Plains has I'd say end user... Read More

Microsoft CRM Customization Secrets ? Second Edition

This article is for advanced Microsoft CRM SDK C# developers.... Read More

Microsoft Great Plains Integration Manager ? Working With Text File

Microsoft Business Solutions main middle market ERP application - Microsoft... Read More

Linux Dual Boot-How To Format

Just the thought of a duel-boot scares many people away,... Read More

Microsoft CRM Integration & Customization: SharePoint Document Gateway

MS CRM is very close to document workflow automation, including... Read More

The Hidden Power of Online Manual

Writing software manuals is boring, isn't it? We often think:... Read More

How a Bug Challenges to a Software Professional

It is really interesting that a bug can create problem... Read More

How to Choose the BEST Charting Software

I suggest that you do not spend a lot of... Read More

Fundraising Software ? How Can That Help Me?

Fundraising software lets you connect with donors in a way... Read More

RFID: Strengthen the Position for SAP; United States

SAP Inc., a global leader in client/server enterprise application software... Read More