user3838910
user3838910

Reputation: 23

syntax error - missing operator - in query expression

I am asked to do the following:

Create a new table, named sec0902_employees, that adds two new columns to the l_employees table.

Create the new columns by using the following row functions:

Column Name: full_name

Access: first_name & ' ' & last_name

Column Name: new_credit_limit

Access: credit_limit + 10.00

Here is my code:

select l_employees.*, 
first_name & ‘ ‘ & last_name as full_name,
credit_limit as new_credit_limit + 10.00
into sec0902_employees
from l_employees;

This is the error:

Syntax error (missing operator) in query expression ‘first_name & ‘ ‘ & last_name as full_name’

enter image description here

Here is a screen shot of the original l_employees table:

enter image description here

Thank you for any assistance you can provide :-)

Upvotes: 0

Views: 1077

Answers (2)

user3838910
user3838910

Reputation: 23

Thanks!! :-) This is the code that worked:

select l_employees.*, first_name & ' ' & last_name as full_name, (credit_limit + 10.00) as new_credit_limit into sec0902_employees from l_employees;

enter image description here

Upvotes: 0

forpas
forpas

Reputation: 164064

Did you mean:

(credit_limit + 10.00) as new_credit_limit

the alias of the new column is new_credit_limit
and it consists of the value of credit_limit + 10.00 isn't it?

Upvotes: 2

Related Questions