tags:

views:

44

answers:

1

In MS Access, my table is:Exam{id,name}, and my query is

select Exam.id as 'Exam.id',Exam.name as 'Exam.name' from Exam

Now when I execute this query this error ocured:

"Exam.id" is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.

I want to use the full table + column as the alias, Exam.name as 'Exam.name', but I don't know how i can get Access to accept it.

Thanks for your attention.

+2  A: 

As the error indicates, punctuation is not allowed in an alias in MS Access. Consider revising your query to eliminate punctuation.

select e.id as 'ExamId', 
    e.name as 'ExamName' 
from Exam e
kbrimington
it solved.it was because of dot.i removed dot from it's alias name: Exam.id as 'Exam/id'
na.fa
Are there databases in which your preferred alias, Exam.ID, would actually work?
David-W-Fenton
@David: It works in Oracle 10g. `select id as "Exam.Id" from MySchema.Exam`.
kbrimington