|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
HOW to count records in database??
in my database each doctor has multiple slips (one to many)..i want to cout the total
number of slips for each doctor and display it in the datagrid...in a culomn called "Uncompleted Slips".. so it will display the total number of slips near the doctor name How can i do that?? SQL Server 2000 |
|
#2
|
|||
|
|||
|
i think u can use following query for that
select count(slips) from <table name> where doctorname=' specify name ' Quote:
|
|
#3
|
|||
|
|||
|
One way (most efficient? I dunno) to do this is query, like the reply above, load it into a dataset. Then use myDS.count (I think that's it, not sure of specifics, but I know there is an attribute of a dataset called count that tells how many records have been loaded into it.)
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > HOW to count records in database?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|