473,549 Members | 3,099 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem selecting max date

2 New Member
Hi everyone, I'm having trouble figuring out how to select the max date in MS ACCESS from an AS400 table with a composite key.

Here's my data:

Type Name Select-Rule Error-Rule Effec-Date Effec-Time Sev-Lvl

X AMTFIN "" AF>8K 11/1/2005 110000 0
X AMTFIN "" AF>8K 5/17/2005 110000 2

The composite key for the table is:

Type & Effec-Date & Effec-Time

How do I only select the first row in the example above?
Jul 23 '06 #1
1 1280
PEB
1,418 Recognized Expert Top Contributor
Hi,

Try:

Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM AS400
  2. WHERE (((Effec-Date)=Dmax("Effec-Date","AS400","")));
  3.  
:)
:)
:)
Best regards

Hi everyone, I'm having trouble figuring out how to select the max date in MS ACCESS from an AS400 table with a composite key.

Here's my data:

Type Name Select-Rule Error-Rule Effec-Date Effec-Time Sev-Lvl

X AMTFIN "" AF>8K 11/1/2005 110000 0
X AMTFIN "" AF>8K 5/17/2005 110000 2

The composite key for the table is:

Type & Effec-Date & Effec-Time

How do I only select the first row in the example above?
Sep 24 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2966
by: Daniel Fisher | last post by:
Hi All! I'm fairly new to PhP and basicly trying to learn right now. Now I have a problem - I have a fairly large collection of movies which people keep borrowing from me. And then not returning. So I've put together an Access database with three tables - my media library, a list of friends and email addresses, and a borrow table which uses...
7
1945
by: Martijn Saly | last post by:
Hi there, I've created a master page with some controls on it, a Calendar control among others. Now depending on the date(s) selected, the content page needs to be updated. In the masterpage I've created StartDate and EndDate properties, which are basically wrappers around the SelectedDates property from the Calendar control. When I...
2
268
by: Tina | last post by:
I'm selecting some columns using a .net dataadapter using Select myDate from myTable. then I... DIM dt as new datatable myda.fill(dt) Now in dubugging I am examining the dt.rows(0).ItemArray (because I didn't trust what was displaying in my datagrid) It shows my date as being 8/31/2005 1:26:45 PM. The problem is that the real date in...
3
15706
by: larry mckay | last post by:
anyone have the code to select and listview item or row (subitems) after a doubleclick event from a listview. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
20
2476
by: Development - multi.art.studio | last post by:
Hello everyone, i just upgraded my old postgres-database from version 7.1 to 7.4.2. i dumped out my 7.1 database (with pg_dump from 7.1) as an sql-file with copy-commands and to one file using insert-statements. after initalizing and starting postgres 7.4 on a different port and datadirectory, i tried to import the sql-dump with the copy...
1
1893
by: vunderusaf | last post by:
I have a listbox on a form that is selecting using named FinalQuery: SELECT ., ., . FROM FinalQuery; Now I have a text field with a date on this form and I'd like to use that date as the selection criteria, comparing to the ... how would I use a field with the WHERE clause?
1
2858
by: MRGRIM | last post by:
Hello I'm trying to solve a problem but I'm not having much luck so suggestions on a work around or fixes would be most appreciated. I am trying to run a select statement on a data table that will return me an array of data rows (sounds simple enough) I have the select statement working if I only use one parameter e.g. driver id, however when I...
3
5784
by: ringer | last post by:
On a form I have a combo where a month is entered. It shows the month names in column one, but it is bound to column two where each month's corresponding number is, ie Jan=1, Feb=2, etc. So selecting April returns 4. Also on the form I have a text box where a number is entered and used as the date of the month in the aforementioned combo box....
5
2590
by: =?Utf-8?B?bWFib25k?= | last post by:
Hi Using a month calendar control so that my user can select a start and end date for a range that will be used in a SQL query. Problem.....if user selects a date in one month and then scrolls to the next month the "date" moves with the scroll......i.e. click on 3rd Feb and then move to March, without any further selection being clicked...
2
2621
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to update the information which is stored in a SQL database. In testing we noticed that the form was updating correctly but the update mechanism was also...
0
7520
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7718
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6041
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.