Link to home
Start Free TrialLog in
Avatar of WeTi
WeTi

asked on

SQL Query questions about changing column name.

Dear experts

I would like to run a query:
This query will show 2 selections in one table with result count. Now problem here is that I want the column name change to Processed and Not_Processed, this is not working right now, it shows No column name.

How do i do?

Code below, thanks.

SELECT (
SELECT count(*)
FROM [Prod].[Data].[IncomingUpdate] As Processed
WHERE InsertTime >= DATEADD(day,-10, getdate()) AND Is = 'P'
),
(
SELECT count(*)
FROM [Prod].[Data].[IncomingUpdate] As Not_Processed
WHERE InsertTime >= DATEADD(day,-10, getdate()) AND Is is null
)
ASKER CERTIFIED SOLUTION
Avatar of Ares Kurklu
Ares Kurklu
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of WeTi
WeTi

ASKER

Yes worked