SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Nov 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating an Account History of a Customer

    I am having a problem on how am I going to formulate my query on MySQL. I have to create an account history a customer and it must be on a chronological order. I have attached a document file. Anyone could help me. Thank you so much.
    Attached Files Attached Files

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,220
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    Code:
    SELECT Entrydate	
         , Description	
         , Amount
      FROM tblCharges
     WHERE Customerid = '2008-0001'
    UNION ALL
    SELECT Entrydate	
         , Description	
         , Amount
      FROM tblPaymentmade
     WHERE Customerid = '2008-0001'
    ORDER
        BY Entrydate
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Addict
    Join Date
    Nov 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot sir.

  4. #4
    SitePoint Addict
    Join Date
    Nov 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This topic is RESOLVED.


Bookmarks

Posting Permissions

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