Re: (Fwd) DBI Dilemma

"Wm Mussatto" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
On Mon, August 17, 2015 14:42, [email protected] wrote:
> ----- Forwarded message from "Adkins, Blake" <[email protected]>
> -----
>
> Date: Mon, 17 Aug 2015 17:51:41 +0000
> From: "Adkins, Blake" <[email protected]>
> To: "[email protected]" <[email protected]>
> Subject: DBI Dilemma
>
>    Tim,
>
>    I've been using your module to enable people in my group to do searches
> on a database that is regularly
>    backed up as a .csv file. The problem here is with a particular column
> name. Of the 140 columns in the
>    database, one is named DESC, short for description. This was
> established well before my time at the
>    company and I believe the name comes from GE who makes the Cimplicity
> product. If I try to do a SELECT
>    using that column, the script dies, or quietly passes DESC in the
> column header and all the rows. I've
>    tried to figure out how to get around it without success. Do you have
> any suggestions aside from
>    renaming the column? (I was thinking along  the lines of escaping the
> name)
>
>    Thanks,
>
>    Blake Adkins
>
Put back tick (i.e., `) around DESC.  `DESC`
DESC is a reserved word and this will tell mySQL that its a Column name
NOT the reserved word.

Hope this helps

------
William R. Mussatto
Systems Engineer
http://www.csz.com
909-920-9154
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.