Microsoft Windows Java ISDN Information

Computer Software Management Products

 RSS  feed      Home      
Web software.dovada.net.au

Powerful New Keyword Software
Keyword Elite - Powerful New Keyword Software Gave Me The Exact
Keywords To Earn An Extra $8,265 From Google Adwords.

SEO Elite marketing software - Norton Anti Virus - Create easy web video - Great software downloads - Music Movies Games Software


Share |


You are free to use content from this page in your blog or website, in return for a link back to this page from that blog or website.



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


This is intermediate level SQL scripting article for DB Administrator, Programmer, IT Specialist

Our and Microsoft Business Solutions goal here is to educate database administrator, programmer, software developer to enable them support Microsoft Great Plains for their companies. In our opinion self support is the goal of Microsoft to facilitate implementation of its products: Great Plains, Navision, Solomon, Microsoft CRM. You can do it for your company, appealing to Microsoft Business Solutions Techknowledge database. This will allow you to avoid expensive consultant visits onsite. You only need the help from professional when you plan on complex customization, interface or integration, then you can appeal to somebody who specializes in these tasks and can do inexpensive nation-wide remote support for you.

Let's look at interest calculation techniques.

Imagine that you are financing institution and have multiple customers in two companies, where you need to predict interest. The following procedure will do the job:

CREATE PROCEDURE AST_Interest_Calculation

@Company1 varchar(10), --Great Plains SQL database ID

@Company2 varchar(10),

@Accountfrom varchar(60),

@Accountto varchar(60),

@Datefrom datetime,

@Dateto datetime--,

as

declare @char39 char --for single quote mark

declare @SDatefrom as varchar(50)

declare @SDateto as varchar(50)

select @SDatefrom = cast(@Datefrom as varchar(50))

select @SDateto = cast(@Dateto as varchar(50))

select @char39=char(39)

if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AST_INTEREST_TABLE]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

CREATE TABLE [dbo].[AST_INTEREST_TABLE] (

[YEAR] [int] NULL ,

[MONTH] [int] NULL ,

[COMPANYID] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,

[ACTNUMST] [char] (129) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,

[BEGINDATE] [varchar] (19) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,

[ENDDATE] [varchar] (19) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,

[YEARDEGBALANCE] [numeric](19, 5) NULL ,

[BEGBALANCE] [numeric](38, 5) NULL ,

[ENDBALANCE] [numeric](38, 5) NULL ,

[INTERESTONBALANCE] [numeric](38, 6) NULL ,

[INTERESONTRANSACTIONS] [numeric](38, 8) NULL ,

[INTEREST] [numeric](38, 6) NULL ) ON [PRIMARY]

exec("

delete AST_INTEREST_TABLE where [YEAR] = year("+ @char39 + @Datefrom + @char39 +") and [MONTH]=month("+ @char39 + @Datefrom + @char39 +")

insert into AST_INTEREST_TABLE

select

year(X.BEGINDATE) as [YEAR],

month(X.BEGINDATE) as [MONTH],

X.COMPANYID,

X.ACTNUMST,

X.BEGINDATE as BEGINDATE,

X.ENDDATE as ENDDATE,

X.YEARBEGBALANCE as YEARDEGBALANCE,

X.YEARBEGBALANCE+X.BEGBALANCE as BEGBALANCE,

X.YEARBEGBALANCE+X.ENDBALANCE as ENDBALANCE,

X.INTERESTONBALANCE as INTERESTONBALANCE,

X.INTERESTONTRANSACTIONS as INTERESONTRANSACTIONS,

X.INTERESTONBALANCE+X.INTERESTONTRANSACTIONS as INTEREST

--into AST_INTEREST_TABLE

from

(

select

"+ @char39+ @Company1 + @char39+" as COMPANYID,

a.ACTNUMST,

"+ @char39 + @Datefrom + @char39 +" as BEGINDATE,

"+ @char39 + @Dateto + @char39 +" as ENDDATE,

case when

b.PERDBLNC is null then 0

else b.PERDBLNC

end as YEARBEGBALANCE,

sum

(

case

when (c.DEBITAMT-c.CRDTAMNT is not null and c.TRXDATE ="+ @char39 + @SDatefrom + @char39 +" and c.TRXDATE =year("+ @char39 + @Datefrom + @char39 +")

where

a.ACTNUMST>="+@char39+@Accountfrom+@char39 +"

and a.ACTNUMST="+ @char39 + @SDatefrom + @char39 +" and c.TRXDATE =year("+ @char39 + @Datefrom + @char39 +")

where

a.ACTNUMST>="+@char39+@Accountfrom+@char39 +"

and a.ACTNUMST


Cat 18793


NEW SEALED MICROSOFT OFFICE PROFESSIONAL 2010 ACADEMIC
ebay image$107.03
End Date: Thursday Mar-8-2012 18:38:54 PST
Buy It Now for only: $107.03
Buy It Now | Add to watch list

Microsoft Office Professional Edition 2003
ebay image$79.95 (0 Bids)
End Date: Thursday Feb-9-2012 9:54:44 PST
Buy It Now for only: $89.95
Buy It Now | Bid now | Add to watch list

Microsoft Windows Small Business Server 2003 Premium w/ 5 cals
ebay image$99.99 (0 Bids)
End Date: Thursday Feb-9-2012 9:55:16 PST
Buy It Now for only: $224.99
Buy It Now | Bid now | Add to watch list

Microsoft Office Home and Student 2007 Full Version 3PC Guaranteed Retail CD/Key
ebay image$89.47
End Date: Saturday Feb-25-2012 14:10:54 PST
Buy It Now for only: $89.47
Buy It Now | Add to watch list

MICROSOFT OFFICE STUDENT AND TEACHER ED. 2003
ebay image$25.00 (1 Bid)
End Date: Thursday Feb-9-2012 9:58:31 PST
Bid now | Add to watch list

MICROSOFT OFFICE 2010 PRO PROFESSIONAL GENUINE NEW SEALED
ebay image$107.03
End Date: Friday Mar-2-2012 10:21:17 PST
Buy It Now for only: $107.03
Buy It Now | Add to watch list

Microsoft Windows XP Professional with Hardware
ebay image$36.78 (11 Bids)
End Date: Thursday Feb-9-2012 10:00:25 PST
Bid now | Add to watch list

Microsoft Office 2007 Home and Student Retail Box 3 PC 79G-00007 NEW
ebay image$99.99 (1 Bid)
End Date: Thursday Feb-9-2012 10:10:29 PST
Bid now | Add to watch list

Microsoft Office XP Standard - OEM - Includes Word, Excel, Outlook, Powerpoint
ebay image$39.95
End Date: Friday Mar-9-2012 18:41:40 PST
Buy It Now for only: $39.95
Buy It Now | Add to watch list

Lot of 57 COMPUTER SOFTWARE CD'S Microsoft Works Suite2000, Word 2000+ MUCH MORE
ebay image$9.99 (1 Bid)
End Date: Thursday Feb-9-2012 10:10:49 PST
Bid now | Add to watch list

MICROSOFT OFFICE 2010 PRO PROFESSIONAL ACADEMIC BOX
ebay image$115.46
End Date: Wednesday Mar-7-2012 13:57:48 PST
Buy It Now for only: $115.46
Buy It Now | Add to watch list

Genuine Microsoft Power Point 2003 with Product Key
ebay image$29.99 (1 Bid)
End Date: Thursday Feb-9-2012 10:25:21 PST
Bid now | Add to watch list

Microsoft Windows OEM XP Pro Professional SP2
ebay image$31.00 (7 Bids)
End Date: Thursday Feb-9-2012 10:30:58 PST
Bid now | Add to watch list

Microsoft Office Professional 2003 FULL VERSION
ebay image$89.00
End Date: Friday Mar-2-2012 16:10:00 PST
Buy It Now for only: $89.00
Buy It Now | Add to watch list

Microsoft Works Suite 2004
ebay image$14.84 (0 Bids)
End Date: Thursday Feb-9-2012 10:36:02 PST
Bid now | Add to watch list

NEW SEALED Microsoft Office Professional 2010 Academic Retail Box
ebay image$107.63
End Date: Wednesday Mar-7-2012 0:59:22 PST
Buy It Now for only: $107.63
Buy It Now | Add to watch list

MICROSOFT OFFICE PROFESSIONAL/ACADEMIC 2010 -ACADEMIC USE VERSION
ebay image$96.00 (16 Bids)
End Date: Thursday Feb-9-2012 10:54:09 PST
Bid now | Add to watch list

Home Business Plan

Peel Away Ads Marketing And Advertising without Pop-Ups, Fly-Ins or Pop-Unders
home | Software site map | custom google search | Software articles | Privacy policy
Copyright © 2009 www.dovada.net.au