View Single Post

   
  #2 (permalink)  
Old 04-03-2008, 02:49 PM
Russell Fields
 
Posts: n/a
Default Re: Select "count" result on ONE line

select count(*), 'total_count' from table_name
- or -
select convert(varchar(10), count(*)) + ' total_count' from table_name

RLF

"rewh2oman" <rewh2oman@discussions.microsoft.com> wrote in message
news:417CCDB1-AD22-4B7A-B252-471381594DD0@microsoft.com...
> I'm doing a "select count(*) from table_name" via ODBC. How can I get the
> answer to be displayed in ONE line?
>
> ex. select count(*) total_count from table_name
>
> total_count
> 22
>
> I need that "22" on the same line as the literal "total_count".
>
> How can I do that? Thanks in advance!



Reply With Quote