views:

21

answers:

1

i create a view table like :

CREATE VIEW ViewManager AS
SELECT 
us.UserId AS 'Account Manager', .........

after that, when i run a query to select data from this view

like :

SELECT  'Account Manager' , .. from ViewManager

then the data i get in this column is the text 'Account Manager' and not the value of the this columns.

Is there a way to solve this ? Of course I can change the field name , but i want to know if there is another solution,

thanks.

+1  A: 

You need to use backticks to escape column and table names.

SELECT `Account Manager` , .. from `ViewManager`
FractalizeR