Board index » delphi » Another little SQL puzzler - at least for me...
Paul Lineh
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Another little SQL puzzler - at least for me...Hi all, I have the following data ID FLT1 10 127 What I want is to be able to something like select count(select DISTINCT TSCHEDULE.ID, TSCHEDULE.FLT1 and the above with "and ID = 10) from TSCHEDULE (neither works) and get 8 returned - i.e. the guy flew 8 flights in a given month. I select DISTINCT TSCHEDULE.ID, TSCHEDULE.FLT1 and then do Query.RecordCount but I was wondering are there any more elegant ways of doing this? TIA. Paul... D4 Pro SP3 - NT 4, SP5 Database - MS SQL Server 7.0 Seo mo sini! |