Skip to Content.
Sympa Menu

freetds - Handling of Sybase column names

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Shrock, Court" <ShrockC AT inhs.org>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: Handling of Sybase column names
  • Date: Tue, 29 Jan 2002 16:18:18 -0800


Here is my problem:

The database that I need to access has table names that are normally
reserved--ie, "Date", "Bit", etc...I would like to be able to pass the query
"SELECT Date FROM Events" or "SELECT * FROM Events ORDER BY Date", but the
response acts as though it thinks Date is a function (I know one does exist,
but I want to refer to the column name, not the function). I know this
because I get an error about wrong number of parameters with the query
"SELECT Date() FROM Events". Any ideas?

Does freetds do any manipulating of the query string before it sends it to
the server listed in the freetds.conf?

I can "SELECT * FROM Events" and the Date column is returned, but my problem
is that how can one include reference to "Date" in the WHERE, GROUP, and
ORDER portions of the query? Incidently, the "SELECT * FROM Events" returns
the data that I need--connectivity is not a problem.

I am accessing the database via PHP-4.1.1/freeTDS-0.53 on linux-2.2.19.

Many thanks,
Court





Archive powered by MHonArc 2.6.24.

Top of Page