May 1, 2007 #1 habneh Programmer Mar 21, 2007 55 US I have a table say tbl1 col1 col2 1 aa 2 bb 3 cc 4 dd I would like to select all records and the total number of records in single statemet here is what the recordset I want noRecords col1 col2 4 1 aa 4 2 bb 4 3 cc 4 4 dd how can i do that thanks
I have a table say tbl1 col1 col2 1 aa 2 bb 3 cc 4 dd I would like to select all records and the total number of records in single statemet here is what the recordset I want noRecords col1 col2 4 1 aa 4 2 bb 4 3 cc 4 4 dd how can i do that thanks
May 1, 2007 #2 AlexCuse Programmer Apr 13, 2006 5,416 US like this? Code: select (select count(*) from tbl1) as cnt , col1 , col2 from tbl1 Hope it helps, Alex Ignorance of certain subjects is a great part of wisdom Upvote 0 Downvote
like this? Code: select (select count(*) from tbl1) as cnt , col1 , col2 from tbl1 Hope it helps, Alex Ignorance of certain subjects is a great part of wisdom
May 1, 2007 #3 Zografski Programmer Aug 23, 2005 37 BG SELECT (SELECT COUNT(*) FROM YourTable) AS Snt, * from YourTable Upvote 0 Downvote
May 1, 2007 #5 AlexCuse Programmer Apr 13, 2006 5,416 US Glad it worked Ignorance of certain subjects is a great part of wisdom Upvote 0 Downvote