Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Recordcount

Author  Topic 

Varsha Patil
Starting Member

3 Posts

Posted - 2008-06-08 : 10:26:08
I have one Table i.e Transaction. I want to display the recordcount of particular user for current date. I have written qury for this but it return only one record as recordcount But the table contain 5 record for that particular user. Pls help me .

Query: CD store the current Date
CD = Text5.Value

Sql = "SELECT DISTINCTROW DummyTran.*FROM DummyTran"
Sql = Sql & " WHERE ((DummyTran.AssignedTo = ""SSS001"") And (DummyTran.Date = ""CD"")); "
Set rs = db.OpenRecordset(Sql)

T = rs.RecordCount

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-08 : 10:33:34
You have used DISTINCTROW in your query. There may be a chance that those 5 records are duplicates. Can you post those 5 records please?
Go to Top of Page
   

- Advertisement -