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.
| Author |
Topic |
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2004-10-07 : 16:33:52
|
| Hi there,How can I get the number of row counts from this querySELECT plan_id,payment_id,date_of_payment,payment_amountFROM tbl_payment_details WHERE plan= @plan AND CONVERT(varchar(8),date_of_payment,1)> CONVERT(varchar (8),getdate(),1) |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-07 : 16:35:16
|
| SELECT plan_id,payment_id,date_of_payment,payment_amountFROM tbl_payment_details WHERE plan= @planAND CONVERT(varchar(8),date_of_payment,1)> CONVERT(varchar(8),getdate(),1)SELECT @@ROWCOUNTOr just change it to COUNT(*)Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-10-07 : 16:39:15
|
| [code]SELECT COUNT(*) AS RowCount FROM tbl_payment_details WHERE plan= @plan AND CONVERT(varchar(8),date_of_payment,1) > CONVERT(varchar(8),getdate(),1)[/code]Brett8-) |
 |
|
|
|
|
|
|
|