0

I successfully created and ran a query for average salary of employees that were hired after 2008 and employees that hold salesperson title in Libreoffice Base. It is like Microsoft Access.

However, I am unsure and unable to change the field name of the query.

I want to change the field name from "Expr1000" to "averagesalary." When I try to use the AS keyword in SQL, I get SQL syntax error.

SQL Status: HY000 Error code: 1000

Syntax error in SQL statement

When I try to use the Alias part in the Query Design, I also get error "The data content could not be loaded."

and "SQL Status: 3075 Error code: -2147217900

Syntax error (missing operator) in query expression 'AVG( Salary ) AverageSalary'."

What do I need to do to change that field name from from "Expr1000" to "averagesalary?"

I want to change the field name from "Expr1000" to "averagesalary." When I try to use the AS keyword in SQL, I get SQL syntax error.

SQL Status: HY000 Error code: 1000

Syntax error in SQL statement

When I try to use the Alias part in the Query Design, I also get error "The data content could not be loaded."

and "SQL Status: 3075 Error code: -2147217900

Syntax error (missing operator) in query expression 'AVG( Salary ) AverageSalary'."

What do I need to do to change that field name from from "Expr1000" to "averagesalary?"

SQL for Libreoffice Base Query:

SELECT  AVG( `Salary` )  

 FROM  `Employee` 

 WHERE `Employee`.`DateHired` >= {d '2009-01-01' }   AND `Employee`.`Title` = 'Salesperson'
June7
  • 19,874
  • 8
  • 24
  • 34
  • Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackoverflow.com/rooms/249367/discussion-on-question-by-ijtnsizziyjhzycguc-how-to-change-field-name-for-query). – Machavity Nov 06 '22 at 12:34

0 Answers0