Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    169

    Sqlite query to get sum of items

    Could someone help me with totalling in Sqlite?

    I am developing an invoice application. I have the invoice generating from a Sqlite database. I have one order number that could have multiple different products. What I need to do is populate the subtotal cell on a html document with the total of all the product prices for that order number.

    How would I do that? My query is :

    "Select (((ProdQty*ProdPrice)+ProdAdditionalCharges)-ProdDiscount) AS [GT] From OrderInfo Where OrderNumber="..orderid99

    How can I get the sum of all of the GT's for that order number?

    Thanks for your assistance!!

    Sue

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    sql has a SUM function built in.

    "Select SUM(GT) From OrderInfo Where OrderNumber="..orderid99

    Try that.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. SQLite plugin problem
    By swilk in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 11-10-2009, 05:22 PM
  2. SQLite database in MEMORY only!
    By Intrigued in forum AutoPlay Media Studio 5.0
    Replies: 5
    Last Post: 10-23-2009, 07:49 PM
  3. How to convert access database to sqlite database.
    By sside in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 07-22-2008, 07:44 PM
  4. SQLite Command Question (DELETE ROW)...
    By Intrigued in forum AutoPlay Media Studio 5.0
    Replies: 15
    Last Post: 12-08-2006, 11:17 AM
  5. Spotlight: SQLite Actions Plugin
    By Desmond in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 03-12-2004, 09:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts