Click here to Skip to main content
15,886,049 members

Comments by LebneizTech (Top 79 by date)

LebneizTech 11-Sep-19 9:26am View    
This is running Sir,
SELECT *
FROM (SELECT Department_Name as Department, P_Gender,count(*) as CC
FROM Vw_IPDPatDetails
WHERE DischageStatus='Y' AND (E_date between '8/1/2019' AND '8/31/2019') group by Department_Name,P_Gender) as DT
PIVOT(SUM(CC)
FOR P_Gender IN ([Male],[Female])) AS PVTTable
LebneizTech 10-Sep-19 9:57am View    
I had Changed, but not working sir.
LebneizTech 10-Sep-19 9:35am View    
Now error shows:
Msg 207, Level 16, State 1, Line 1
Invalid column name 'Department'.
LebneizTech 10-Sep-19 8:01am View    
Sir, this error:
Msg 325, Level 15, State 1, Line 7
Incorrect syntax near 'PIVOT'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the stored procedure sp_dbcmptlevel.
LebneizTech 31-Jul-18 8:51am View    
Dear Sir, I want to print name and address 12 times on a A4 Lebel sheet of 12 Sticker . Means same output with name and address 12 times.