The Wayback Machine - https://web.archive.org/all/20050308201117/http://www.businessseek.biz:80/article-directory/article-94.html
BusinessSeek.biz Business Directory & Search Engine
Questions? Click here to chat.
Advertise | New Sponsors | New Listings | Top Referrers | New Articles | Site Map | Sponsor Accounts
Search for in Advanced
Business Directory >> Web Development >> Article
Featured Links

SQL: Querying Microsoft Great Plains

SQL: Querying Microsoft Great Plains

overview for Database Administrators

by Andrew Karasev 

Looks like Microsoft Great Plains becomes 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!


About The Author

Alba Spectrum Technologies

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide and international Great Plains, Microsoft CRM implementation and customization company, based in Chicago, California, Texas, New York, Florida and having locations in multiple states and internationally (www.albaspectrum.com), he is CMA, CFM, International Business specialist, Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.

help@albaspectrum.com

Tel: 1-866-528-0577

 
Rating: 1.00 (1 votes)
Comments: 0 - Write a comment - Posted: 27/7/2004 - Updated: -
 
Category: Web Development | New Articles | Page Top
 

Rate it

SQL: Querying Microsoft Great Plains

Please rate this article between 1 and 5 with 5 being top.









Directory Categories
Automotive
Business & Finance
Computers & Software
Education & Research
Employment
Entertainment
Government & Law
Healthcare & Beauty
Home & Garden
Industry & Engineering
Internet & Online
Real Estate & Development
Retail & Shopping
Science & Environment
Small Business
Society & Culture
Sport
Telecommunications
Travel & Tourism
World

Article Categories
Business & Finance
Computers & Software
Employment
ERP Systems - Reviews
Healthcare & Beauty
Industry & Engineering
Internet & Online
Investment
Marketing Strategies
Press Releases
Retail & Shopping
Search Engines
Small Business
Travel & Tourism
Web Development

Advertise With Us
  • Sponsored Listings
  • Up to 20% discount

  • Traffic Rank by Alexa




    Home | Refer A Friend | Affiliates | Link To Us | Submit A Site | Submit An Article | Web Submit | Contact Us
    Copyright © 2003 - 2005 BusinessSeek.biz - Business Directory & Search Engine. All rights reserved.
    Partner Directory: Web Directory by HotVsNot.Com