Can it work using Quick ? Works with quiz.

Robert Edis robeconsult@sbcglobal.net
Mon, 15 Nov 2004 13:15:39 -0800 (PST)


Yvonne

It would help to know what your environment is.

I'll assume you are using an RDBMS with a SQL
interface.

Using a cursor to access the data a SQL statement such
as:

SELECT DISTINCT
       T1.userid, T1.creditlimit, T2.creditused
  FROM table AS T1,
       (SELECT userid, SUM(creditused) AS Creditused
FROM table GROUP BY userid) AS T2 
 WHERE T1.creditlimit < T2.creditused

Regards

Blue


--- Yvonne Erkes <Yvonne@Kinetix.co.nz> wrote:

> 
> Hi David.
> 
> Unfortunately this wouldn't work, as each customer
> can have multiple
> credit cards.
> This means I need a total value of all account
> balances for a customer
> and a total value of all credit limits for that
> customer before I can
> perform the 'select'
> 
> Got any other ideas ??
> 
> Yvonne.
> 
> -----Original Message-----
> From: David Morrison - Corporate
> [mailto:dmorrison@mcbrideelectric.com] 
> Sent: Tuesday, November 16, 2004 9:04 AM
> To: Yvonne Erkes; powerh-l@lists.sowder.com
> Subject: RE: Can it work using Quick ? Works with
> quiz.
> 
> 
> Yvonne,
> 
> Have you tried something like:
> 
> FILE customer
> SELECT customer IF account_balance > credit_limit
> ACCESS customer ...
> 
> If so, make sure you put the SELECT before the
> ACCESS, so that if you
> have multiple ACCESS statements (paths), the SELECT
> will apply to all of
> them.
> 
> Thanks.
> 
> David Morrison
> McBride Electric
> 
> 
> -----Original Message-----
> From: powerh-l-admin@lists.sowder.com
> [mailto:powerh-l-admin@lists.sowder.com]On Behalf Of
> Yvonne Erkes
> Sent: Monday, November 15, 2004 11:53 AM
> To: powerh-l@lists.sowder.com
> Subject: Can it work using Quick ? Works with quiz.
> 
> 
> 
> > Hi all.
> >
> > Would you be able to enlighten me on how to solve
> a problem I have 
> > with quick screens vs quiz reporting?
> >
> > I've been asked to create a quick screen which
> will display all 
> > customers that have gone over their overall credit
> limit. (Customer 
> > can have more than one credit card)
> >
> > The file records store credit limit & account
> balance...but not the 
> > difference.
> >
> > Is there a way of displaying only the customers
> with total account 
> > difference being greater than their total account
> credit limit ?
> >
> > I'm able to get results using quiz subfiles, but
> am having problems 
> > figuring out how to get results using quick.
> >
> >  
> >
> >  
> >
> >  
> >
> >  
> >
> 
> 
> -- 
> David R. Sowder
> Supervisor of Language Acquisition Center
> Department of Modern Languages
> University of Texas at Arlington
>     Work: 817-272-5148  davids@uta.edu   
> http://langlab.uta.edu/
> Personal:               david@sowder.com 
> http://david.sowder.com/
> 
> 
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = =
> = =
> Mailing list: powerh-l@lists.sowder.com
> Subscribe: "subscribe" in message body to
> powerh-l-request@lists.sowder.com
> Unsubscribe: "unsubscribe <password>" in message
> body to
> powerh-l-request@lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you
> must be a subscriber.
> 
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = =
> = =
> Mailing list: powerh-l@lists.sowder.com
> Subscribe: "subscribe" in message body to
> powerh-l-request@lists.sowder.com
> Unsubscribe: "unsubscribe <password>" in message
> body to powerh-l-request@lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you
> must be a subscriber.
>