A
ambarish.mitra
Hi all,
Using the DBI module, I have connected to a CSV file, and am trying to
execute SQL queries on the CSV file. I am stuck when there is a space
in the field name and I cannot proceed.
The CSV file col heading:
"Attribute","Display Name","Semantic Type","Display Type". (ie, space
in the heading)
I am trying to "prepare" only those lines for which 'Display Type' is
given.
The error line is given:
my $sth = $dbh->prepare("select * from report where [Display Type]
=MultiLineText");
SQL ERROR: Bad table or column name '[Display Type]' has chars not
alphanumeric or underscore!
SQL ERROR: Couldn't find predicate!
I have tried some googling and also tried multiple combination of
brackets/qoutes/escapes with a hope that one of them will work, but
without luck.
Question: What is the way to fire this command in PERL where the field
name (and value as well) can have spaces?
Regards,
Ambarish.
Using the DBI module, I have connected to a CSV file, and am trying to
execute SQL queries on the CSV file. I am stuck when there is a space
in the field name and I cannot proceed.
The CSV file col heading:
"Attribute","Display Name","Semantic Type","Display Type". (ie, space
in the heading)
I am trying to "prepare" only those lines for which 'Display Type' is
given.
The error line is given:
my $sth = $dbh->prepare("select * from report where [Display Type]
=MultiLineText");
SQL ERROR: Bad table or column name '[Display Type]' has chars not
alphanumeric or underscore!
SQL ERROR: Couldn't find predicate!
I have tried some googling and also tried multiple combination of
brackets/qoutes/escapes with a hope that one of them will work, but
without luck.
Question: What is the way to fire this command in PERL where the field
name (and value as well) can have spaces?
Regards,
Ambarish.