in reply to Re^4: SQL Query error while executing in perl. Is it possible to execute these Scripts??
in thread SQL Query error while executing in perl. Is it possible to execute these Scripts??
Wrong. Most SQL engines require single quotes for values, and double quotes for otherwise illegal identifiers.
The "Wrong" bit is debatable Alexander as I believe the node you replied to was attempting to comment on the inclusion of @something in the same SQL which included $tim. I read the node as you could use single quotes around the SQL string to avoid @something being interpreted by Perl as an array but since you also include $tim you need to use double-quotes (around the SQL) and escape the @something.
However, other than that I agree with most of your points and advice except to point out a slight snag with the quote_identifier. Most databases have some rather nasty rules about quoted and unquoted identifiers like some uppercase unquoted identifiers, some lowercase them and some keep the case. Once you use quoted_identifier in many databases you have to get the case exactly right. Some also require table/column names the same as reserved words to be quoted. All I'm really saying is it is not clear cut whether to use quote_identifier always.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: SQL Query error while executing in perl. Is it possible to execute these Scripts??
by afoken (Chancellor) on Dec 08, 2010 at 12:58 UTC |