•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 401,695 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,710 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 1770 | Replies: 3
![]() |
•
•
Join Date: Sep 2005
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
•
•
Join Date: Nov 2005
Location: Montreal, QC (Almost)
Posts: 130
Reputation:
Rep Power: 3
Solved Threads: 9
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
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
•
•
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation:
Rep Power: 7
Solved Threads: 107
•
•
Join Date: Nov 2005
Location: Montreal, QC (Almost)
Posts: 130
Reputation:
Rep Power: 3
Solved Threads: 9
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
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
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- how will i repeat my whole game program? (Java)
- Giving records in MS Access unique numbers (MS Access and FileMaker Pro)
- force Search Page to return no records on open (ASP)
- Querying database records (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: How do I get the default action of a specific file type?
- Next Thread: search for file extension



Linear Mode