Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Gerzon
  Where is Gerzon?
 Yogyakarta
 Indonesia
 Gerzon
 Tags
Subject: RE: Query Result Like Bank Statement
Thread ID: 112291 Message ID: 112319 # Views: 2 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Tuesday, November 07, 2006 9:43:28 AM         
   


> > > Hi experts,
> > > Can someone give me SQL Statement that can generate result Like Bank Statement, I mean for Balance every row got from pervious row balance(debit-credit).
> > > thanks
> > >
> > > Regards
> > > Gerzon

> > You most probably will have to get the cursor and then work on it.
> >
> > select debits,credits,0 as balance into cursor bankstatement readwrite
> > select bankstatement
> > m.balance=0
> > scan
> >    m.balance=m.balance+debits-credits
> >    replace balance with m.balance
> > endscan
> > 

> >
> > In case you want it in a report there is no need from the balance column
> > put debits-credits in the expression, in calculation choose sum, reset at change in
> > account. If you have an opening balance, create a variable in the report. Initial value give the opening balance.
> >
> >
> > Regards
> > Tushar

>
> Thanks Tushar. But if there way to get reult by SQL Statement...?
>
> regards
> gerzon

Not to my knowledge

Regards
Tushar

ENTIRE THREAD

Query Result Like Bank Statement Posted by Gerzon @ 11/7/2006 5:00:52 AM
RE: Query Result Like Bank Statement Posted by Bernard Bout @ 11/7/2006 7:30:10 AM
RE: Query Result Like Bank Statement Posted by Gerzon @ 11/7/2006 8:51:55 AM
RE: Query Result Like Bank Statement Posted by Noker Lodia @ 11/7/2006 9:27:41 AM
RE: Query Result Like Bank Statement Posted by Gerzon @ 11/7/2006 9:46:16 AM
RE: Query Result Like Bank Statement Posted by tushar @ 11/7/2006 9:16:14 AM
RE: Query Result Like Bank Statement Posted by Gerzon @ 11/7/2006 9:39:03 AM
RE: Query Result Like Bank Statement Posted by tushar @ 11/7/2006 9:43:28 AM