Access SQL Query

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I am trying to run the SQL Statement:
Select Name AS 6.6%_retouched from Products

6.6%_retouched is an Alias for Name


I get the illegal name message.

Anyone know a workaround?


Thanks

(e-mail address removed)
 
Michael,

The error message probably indicates "illegal characters or punctuation" as
the reason for the failure, which points directly to your use of a period
mark in the alias. If you are using your query as the record source for a
form or a report, you can use any legal alias and then make the Label in the
form or report read "6.6%_retouched"
 
I am trying to run the SQL Statement:
Select Name AS 6.6%_retouched from Products

6.6%_retouched is an Alias for Name


I get the illegal name message.

Anyone know a workaround?


Thanks

(e-mail address removed)

At the VERY least, use square brackets: AS [6.6%_retouched].

Or, better, follow Cheryl's advice and use a legal alias; the
fieldname and the label that the user sees are independent. Just set
the Caption property of the field; the caption defaults to being the
same as the fieldname but they can be set independently.
 
Hi Michael!

Try prepending the Alias with a non-numeric character, such as _.

Many parsers can't handle a string that begins with a number.

I don't know too much about SQL but I bet the database's SQL parser/handler
has this problem.

Good luck!

Rgds,

Tze-Chiu Lei
GC Webmaster
NOL Global Campus
APL, Ltd.
 
Back
Top