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


S is for Spying, Surveillance -- and for Software as Well

Words we choose to describe things and phenomena often show... Read More

Microsoft Great Plains Implementation ? Overview for IT Director/Controller

What is installation in the language of technology? Installation... Read More

Groupware and Version History: Collaboration Series #1

This article is the first of a series of articles... Read More

Microsoft CRM Data Import FAQ

Microsoft CRM has built-in conversion tool, however you should probably... Read More

Free PDF Publishing Software

In a previous article, I wrote about OpenOffice... Read More

10 Things You Can Do With Photoshop CS2 That You Couldnt Do Before Now

Is Photoshop CS2 worth the upgrade? You bet it is!... Read More

Reduce TCO: The Java Database Way

TCO (Total Cost Ownership) is the buzzword in... Read More

Internet Relay Chat - A Basic Introduction

What is IRC?IRC is Internet Relay Chat. It is a... Read More

Microsoft Great Plains: Interest Calculation Example ? Stored Procedure for Crystal Report

This is intermediate level SQL scripting article for DB Administrator,... Read More

What is Spyware? Are You Being Watched?

Find out why Spyware Removal from computers is important and... Read More

Manufacturing Solutions for Microsoft Great Plains ? Overview for Consultant

Microsoft Business Solutions Great Plains has full-featured manufacturing set of... Read More

Collaboration Software: Index of Collaboration Software Technologies

Collaboration SoftwareCollaboration Software, also known as group collaboration software or... Read More

Hubris - Definition: Microsofts Passport

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

Rapid Application Development - Is it Really a Need of Today?

Rapid Application Development (RAD) is a software development methodology. In... Read More

Design a Web Album Using Adobe Photoshop- Part 2

So let's begin crunching down these 300 images using Adobe... Read More

Can You Calculate Complex Financial Calculations?

Are you a whiz at calculating financial information? Not the... Read More

Linux Dual Boot-How To Format

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

Scrap Booking Online: Word Perfect or Corel Graphics Suite?

Scrapbooks are very popular these days. I think that almost... Read More

Microsoft Great Plains Customization Tools Evolution ? Overview for Consultant

When Great Plains Software introduced the first graphical accounting application... Read More

An Easy Way to Develop JAVA Enterprise Applications

Research bears that less than 70 percent of development projects... Read More

Marketing Your WinRunner Team

It won't matter how effective your WinRunner Team is if... Read More

Interactive Mapping Brings Information to Life

What is Interactive Mapping?Interactive mapping is a visual display medium... Read More

Vlans

In order to implement VLANs in a network environment, you'll... Read More

Microsoft Great Plains as ERP and Microsoft CRM as CRM

If you have Microsoft Great Plains and support it for... Read More

Beware of Spyware

One day, you suddenly realize that your computer started to... Read More

Microsoft Blues

With the advent of 'Service Pack 2' for Windows XP... Read More

CRM 101: Customer Relationship Management for Beginners

Customer Relationship Management, abbreviated "CRM," is the term for a... Read More

Microsoft Great Plains 8.0 Brazilian Version ? Overview For International Consultant

Microsoft Great Plains has substantial mid-market share in the USA... Read More

Software Development in 2005 - Back to the Future

2005 ? Back to the Future.What does the future hold?... Read More

Preventive Maintenance Software Companies

Several software companies design programs for preventive maintenance. Most of... Read More

Microsoft Small Business Manager eCommerce ? Overview

Microsoft Business Solutions Small Business Manager is scaled down Great... Read More

FreeDOS

Before September 1995, Microsoft Windows was an MS-DOS program. DOS... Read More

Daffodil DB: Web Database

What is a Web Database?A web database is a database... Read More