Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 27th, 2006, 12:51 AM
Friend of Wrox
 
Join Date: Jan 2006
Location: Hardwar, Uttranchal, India.
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default lowest Price Fetching

Hi everyone!

  I've a problem with Access Database. I want to fetch lowest price and its product name. I'm using a SQL Query like:


select pro_name, prorate from (select pro_name, sum(pro_rate) as prorate from mandatory group by pro_name, pro_rate
order by pro_rate) where rownum = 1


This Query is successfully running in oracle but in the access i am not getting the output I think Access does not support the ROWNUM keyword so can you help me here to take this query or any other way to fetch such a record.

Thanks for any suggestion.

Deepak..
__________________
DPK..
Reply With Quote
  #2 (permalink)  
Old February 27th, 2006, 10:38 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

if it always the first row, why not

SELECT TOP 1 pro_name, etc....



HTH

Gonzalo
Reply With Quote
  #3 (permalink)  
Old February 28th, 2006, 07:15 AM
Friend of Wrox
 
Join Date: Jan 2006
Location: Hardwar, Uttranchal, India.
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default

Thanks Gonzalo!

Now I done it.

Deepak..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lowest and highest values in report list Odeh Naber Access 7 July 25th, 2007 06:26 AM
Select the latest date, then the lowest price. Stuart Stalker SQL Server DTS 2 October 12th, 2006 03:42 AM
get a lowest price Jane SQL Language 1 March 11th, 2005 10:02 AM
Finding the row with the lowest time value Paulsh Access VBA 3 November 16th, 2004 03:06 PM
Is it worth the price? Spivonious C# 4 August 11th, 2004 03:32 PM



All times are GMT -4. The time now is 04:49 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.