Skip Menu |

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 6659
Status: resolved
Priority: 0/
Queue: SQL-Statement

People
Owner: JZUCKER [...] cpan.org
Requestors: pobugfix [...] peterlink.ru
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.09
Fixed in: (no value)



Subject: SQL::Parser do not treat fiedls starting with undescores as valid table fields
distribution: SQL-Statement-1.09 SQL::Parser do not treat fiedls starting with undescores as valid table fields. In sub. SQL::Parser::IDENTIFIER this case was called as "BAD START".
Show quoted text
> SQL::Parser do not treat fiedls starting with undescores as valid table
That's the ANSI SQL standard - identifiers must begin with a-z or A-Z, they can not start with underscore or numbers. If you want to use a non-standard table name, you need to use Identifier delimiters - put quotes around the name e.g. #1 is valid SQL and accepted by SQL::Parser, but #2 is invalid SQL and rejected by SQL::Parser 1. SELECT * FROM "_mytable" 2. SELECT * FROM _mytable In the future I may allow "loosening" SQL rules (allow names that are not valid ANSI SQL). Thanks for your report!
[JZUCKER - Thu Jun 17 21:13:12 2004]: Show quoted text
> > SQL::Parser do not treat fiedls starting with undescores as valid
> table > > That's the ANSI SQL standard - identifiers must begin with a-z or A-Z, > they can not start with underscore or numbers. If you want to use a > non-standard table name, you need to use Identifier delimiters - put > quotes around the name e.g. #1 is valid SQL and accepted by > SQL::Parser, > but #2 is invalid SQL and rejected by SQL::Parser > > 1. SELECT * FROM "_mytable" > 2. SELECT * FROM _mytable > > In the future I may allow "loosening" SQL rules (allow names that are > not valid ANSI SQL). > > Thanks for your report!
Thank you for your reply. I did'nt mean undescores in table name, but I mean column names. I may be wrong, but I often use columns beginning from undescores and never got any problems before. Thanks again for you reply. Andrew.
Rules for SQL Identifiers apply to both table and column names. If you want to start one with an underscore, you must delimit it with quotes to be valid