-
Formatting an SQL select
Hi, I am trying to format the SQL query i have below in order to have the CoLocalCount show up with '# of Locals:' in front of the actual Count itself. I have changed to count to varchar in order for it to be able to read text but no matter where i put the actual 'quotes' it errors out. Any help would be appreciated.
SELECT *
FROM
(
SELECT 'Company Name : ' + JE.NAME AS CompanyName,
--CoJC.Code AS CoLocalCode,
CAST(COUNT (CoJC.Code) AS varchar(25)) AS CoLocalCount,
--
JWL.NAME AS WorklocationName,
--WLJC.Code AS WLLocalCode
CAST(COUNT(WLJC.Code) AS varchar(25)) AS WLLocalCount
FROM dbo.Job_Employer JE
-
Where is '# of Locals:' supposed to be in the query?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|