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


Microsoft Great Plains ? Licensing & Product Versions

Current Microsoft Business Solutions Great Plains has more that 10... Read More

How To Identify, Cure and Prevent Spyware/Adware Infections

Just when you thought you were Web savvy, one more... Read More

Save Your Resources - Combine Your IM Clients

There are so many different programs that clutter up your... Read More

Putting Screensavers Under Control

No matter how much you enjoy your favorite screensavers, sometimes... Read More

Computer Based Language Development and Spell-checking

Language development computer: Computer-based method for aiding language development seems... Read More

How to Tell You Have Spyware, Ad-ware or Viruses

Usually, the easiest way to tell you have spyware is... Read More

How To Choose A Fire Wall Software Program

In the real world a "fire wall" is a fireproof... Read More

Microsoft Great Plains on Ctree or Pervasive SQL ? What to Do ? Tips for IT Manager

As you probably know, when Microsoft purchased Great Plains Software... Read More

Microsoft CRM Custom Design & Development: SDK, C#, SQL, Exchange, Integration, Crystal Reports

Microsoft CRM is new player on the CRM software... Read More

Microsoft Great Plains: Government & Non-Profit Organization ? Workflow Implementation

Usually workflow & messaging is realized in CRM and then... Read More

How Do I Get Rid Of That Darn Spyware?

Ad-Aware and Spybot are probably the two most well known... Read More

Lotus Domino/Notes - Microsoft Great Plains Tandem as ERP with Documents Workflow - Overview for IT

Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More

Microsoft Great Plains Inventory Control ? Overview For Consultant

Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More

RSS: Get Notified When Your Favorite Websites Are Updated

RSS (Really Simple Syndication) is a way for a site... Read More

Microsoft CRM Data Import FAQ

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

Twelve Things You Should Know to Save on Computer Software

Do you want to get quality software at a reasonable... Read More

Linux for Home Users

Hey Guys! Don't raise your eyebrows or fear by hearing... Read More

Three Steps To Windows Safety Heaven

Now there are Three Steps To Heaven Just listen and... Read More

10 Ways to Learn a Software

Following tips help you to learn a software in lesser... Read More

Outlook... Not Just for Email! Using Your Outlook Calendar

Microsoft Outlook is one of the most widely used software... Read More

Examining the Substance of Studio MX

To all web designers out there, this article is for... Read More

Antivirus Software ? Get The Bugs Before They Get You!

You turn on your computer, and it doesn't look quite... Read More

Easy Guide to RAID Recovery

What is RAID RECOVERY?RAID stands for Redundant Array of Inexpensive... Read More

Software Piracy - Global Increase

Pirated software is on the increase and now accounts for... Read More

Constructionalist Parsing - Deciphering Natural Language

The research in the field of Natural Language Processing usually... Read More

Adware, What Is It?

Adware is a type of Spyware program that displays some... Read More

Two Reasons to Use Timesheet Software

This short paper will expand on two key reasons to... Read More

It?s Back!! WordPerfect?s Amazing Comeback

Have you noticed WordPerfect is gearing up for a comeback... Read More

Microsoft Great Plains RW: Report Writer

Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More

Dont Choose Adobe When Working With PDF

While Adobe is the most known maker of PDF tools,... Read More

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

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

Implementing ERP for Large Publicly Traded Corporation ? Microsoft Great Plains

We would like first emphasize the change in the paradigm.... Read More

Hubris - Definition: Microsofts Passport

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