Convert Access Sumary Query to Oracle Pass Through Query

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Convert Access Sumary Query to Oracle Pass Through Query

  1. #1
    Join Date
    Aug 2004
    Orange, California

    Convert Access Sumary Query to Oracle Pass Through Query

    I have a summary query in Access which has several Fields that use the First Or Last options. There is no equivolent function in Oracle. Does anyone know how to do this in oracle?

    Simplified version of Access Query:
    SELECT CustName, First(AcctType), Last(SalesPerson), Sum(MonthlySales) FROM CustSales WHERE SalesMonth Is Not Null And SalesYear = 2007 GROUP BY CustName;

  2. #2
    Join Date
    Feb 2004
    It's because first and last dont really make sense without some kind of order.

    I suggest that you use analytical functions:

    For example:
    SELECT department_id,
           MIN(salary) KEEP (DENSE_RANK FIRST ORDER BY commission_pct) "Worst",
           MAX(salary) KEEP (DENSE_RANK LAST ORDER BY commission_pct) "Best"
    FROM employees
    GROUP BY department_id;
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

Similar Threads

  1. Query works in Access, but not VB .NET
    By corygibbons in forum Database
    Replies: 6
    Last Post: 07-11-2007, 09:30 PM
  2. setting up server
    By kylemcna in forum ASP.NET
    Replies: 5
    Last Post: 04-13-2007, 03:23 AM
  3. Run Access Query with VBA function in VB6?
    By Ron Weller in forum VB Classic
    Replies: 5
    Last Post: 10-12-2006, 07:23 PM
  4. Pass Parameter from VB App to Data Access Page
    By jonaz in forum VB Classic
    Replies: 0
    Last Post: 03-16-2006, 06:31 PM
  5. Query help in Access Combo Box
    By Larry Muller in forum VB Classic
    Replies: 1
    Last Post: 02-24-2001, 11:12 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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

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