Board index » delphi » Help - Accessing Fields that have keywords as Column Name (eg: TIME)

Help - Accessing Fields that have keywords as Column Name (eg: TIME)

I have a column in a database called FILTER how can I access this in a SQL
statement

eg:
        SELECT FILTER FROM SENSORS

I realise now that FILTER is a Keyword and I shouldn't have used it!!!!

Can anybody help with a work around???

Pete.

 

Re:Help - Accessing Fields that have keywords as Column Name (eg: TIME)


Try using an alias

eg:
        SELECT FILTER AS MYFILTER FROM SENSORS

which will return the value of FILTER in a column called MYFILTER.

James

Quote
p wrote:

> I have a column in a database called FILTER how can I access this in a SQL
> statement

> eg:
>         SELECT FILTER FROM SENSORS

> I realise now that FILTER is a Keyword and I shouldn't have used it!!!!

> Can anybody help with a work around???

> Pete.

Re:Help - Accessing Fields that have keywords as Column Name (eg: TIME)


Enclose the field name in quotes (").

Florin

Re:Help - Accessing Fields that have keywords as Column Name (eg: TIME)


Great!  That worked a treat!
Quote
Florin Vancea wrote in message <7n4hj6$jv...@forums.borland.com>...
>Enclose the field name in quotes (").

>Florin

Other Threads