i m develop a system related car in/out records. I got data fields like date, time in, time out, car numbers......
My problem is How to count the repeat records base on repeat car numbers on a certain date?( my purpose is count how many times a car in/out on a certain date) :?: :?:
i hope anyone here can understand my problems and pls help me

If I understand your problem correctly you want to know how many times a certain car was in/out on a certain date. Is that correct?

If so, you can issue the following query:

SELECT Table.Date, Table.car, Count(Table.car) AS CountOfcar
FROM Table
GROUP BY Table.Date, Table.car;

This will give you a dataset that has the date, the car number and how many time that car appears during that date. If you need to restrict the records further, for example only those that have both in and out times or for a specific date range, just add a WHERE clause to restrict the data.

Hope this helps

Yomet

Assuming you are using a database program, and not something sick like flat files :eek:

Listen to Comatose - he's totally correct.

I made the unsaid assumption that you are using some kind of SQL compliant database as your back end - otherwise you'll have to find another way of doing this.

Thank you Comatose for setting me straight... ;)

I'll do my best not to make unsaid assumptions again... :)

Yomet

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.