Shomaail
Shomaail

Reputation: 493

Upper case in ALIAS for column Name not working

In the following select statement firstname and Middlename ALIAS does not appear. I want this column header to be in Uppercase.

SELECT  dbo.Employee.Title AS SAL,
        dbo.Employee.FirstName AS FIRSTNAME,
        dbo.Employee.MiddleName AS MIDDLENAME
FROM dbo.Employee 

Upvotes: 0

Views: 7377

Answers (2)

marcioggs
marcioggs

Reputation: 697

Using double quotes works on PostgreSQL.

SELECT Title AS "SAL",
   FirstName AS "FIRSTNAME",
   MiddleName AS "MIDDLENAME"
FROM dbo.Employee 

Upvotes: 2

Brendan
Brendan

Reputation: 1247

I have tried it and it works fine for me. However, here is a suggested change to your SQL which may assist.

SELECT Title AS [SAL],
       FirstName AS [FIRSTNAME],
       MiddleName AS [MIDDLENAME]
FROM dbo.Employee 

Upvotes: 2

Related Questions