[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Back-sql and reserved words

On Sat, 17 Nov 2001, Luzian Scherrer wrote:

> Hello,
> I have a really annoying problem ; I use back-sql to connect to an
> Oracle Database to map some data from my existing tables to posixAccount
> objectclass. This results sooner or later in a query like this:
>   SELECT users.name AS uid FROM users WHERE users.id=?
> This does not work because of the 'AS uid' part, uid seems to be an
> Oracle reserved keyword:
>   SELECT 'hello' AS uid_ FROM dual;    -- this works
>   SELECT 'hello' AS uid FROM DUAL;     -- this does not work :(
> If it were my own objectClass I'd change the attribute name, but of
> course I cannot change posixAccount.
> Did anyone else stumble across this?

You should be able to say

	SELECT 'hello' as 'uid' from dual;

Bob Gautier
Ateb Limited