Hi all,
I've also posted this query to the Perl forum, but thought it also crosses into general SQL as well.
Short story:
I have a CSV file being used as a datasource for a perl script (using the DBI/DBD-CSV modules).
General querying of the data works fine, however a few of the field names in the table contain whitespace. For example field "Marine or Freshwater"
I'd like to construct an SQL query based on the values in this field, something like:
SELECT * FROM table WHERE "Marine or Freshwater" = 'Marine'
However, the DBD-CSV module in Perl has a problem parsing this. I'm just wondering if white-space in field names is an issue in general with databases and SQL, or if it may be a shortcoming of DBD-CSV.
Any comments or suggestions on how I might go about doing this would be most welcome (note: I don't have control of the datasource or its design, so modifying the field names is not an option at this point)
Many thanks in advance...
I've also posted this query to the Perl forum, but thought it also crosses into general SQL as well.
Short story:
I have a CSV file being used as a datasource for a perl script (using the DBI/DBD-CSV modules).
General querying of the data works fine, however a few of the field names in the table contain whitespace. For example field "Marine or Freshwater"
I'd like to construct an SQL query based on the values in this field, something like:
SELECT * FROM table WHERE "Marine or Freshwater" = 'Marine'
However, the DBD-CSV module in Perl has a problem parsing this. I'm just wondering if white-space in field names is an issue in general with databases and SQL, or if it may be a shortcoming of DBD-CSV.
Any comments or suggestions on how I might go about doing this would be most welcome (note: I don't have control of the datasource or its design, so modifying the field names is not an option at this point)
Many thanks in advance...