Advice welcomed on this problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Advice welcomed on this problem

  1. #1
    Join Date
    Sep 2004
    Location
    Northampton,United Kingdom
    Posts
    230

    Talking Advice welcomed on this problem

    me again

    Guys i need some more advice

    how would I create a Mutisaver summary?

    Example

    Diet Coke
    2 @ 0.88 1.76
    * D/C saver * -0.36
    Diet Coke
    2 @ 0.88 1.76
    * D/C saver * -0.36
    Diet Coke
    2 @ 0.88 1.76
    * D/C saver * -0.36
    Diet Coke
    2 @ 0.88 1.76
    * D/C saver * -0.36

    when the user request the "Summary" I would like it to show up as the following

    Mutisaver Name MS Qty Total Saved
    * D/C saver * 4 1.08


    any idea's

    Thanks

    Drew

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    How are the individual line items stored? Are they in a database? Program variables?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Sep 2004
    Location
    Northampton,United Kingdom
    Posts
    230
    The Description and Value comes from a Database

    I would need it to list all mutisaver's

    Any idea's?

  4. #4
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Seems like a standard GROUP BY query:

    SELECT MultiSaver.Description, Count(MultiSaver.ID) AS [MS Qty], Sum(MultiSaver.Value) AS [Total Saved]
    FROM MultiSaver
    GROUP BY MultiSaver.ID;
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  5. #5
    Join Date
    Sep 2004
    Location
    Northampton,United Kingdom
    Posts
    230
    Thats is just what i needed

    ay idea how I can work this bit out.

    if a user keys in 3 and the mutisaver is 2

    how would i get it to do the mitsaver and then store the over number back into the database

    eample

    DIET COKE
    3 @ 0.88 2.64
    * D/C Saver * -.036

    then in the database the over number (that would be 1) would be saved into the PoSScan feild)

    and if the user enters another 1 the mutisaver would then kick in again

    hope you can understand what I mean

Similar Threads

  1. App Problem with MS Office ...
    By Shannon in forum VB Classic
    Replies: 7
    Last Post: 06-24-2007, 09:47 PM
  2. login problem
    By dbrook007 in forum ASP.NET
    Replies: 0
    Last Post: 11-06-2006, 05:54 AM
  3. ActiveX problem using VB
    By koraal in forum VB Classic
    Replies: 3
    Last Post: 11-03-2006, 04:50 PM
  4. Problem with Search
    By Irina in forum ASP.NET
    Replies: 0
    Last Post: 11-29-2002, 11:47 PM
  5. Advice for breaking into the field (repost)
    By David K. in forum Careers
    Replies: 0
    Last Post: 01-15-2001, 10:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center