Re: Column names have spaces in them!!!

2006-02-02 Thread Robert Hicks
Alexander Foken wrote: snip You could slowly migrate your system, a first step would be to make sure all table and column names match /^[A-Za-z][A-Za-z0-9_]+$/. Next, move the tables and the business logic to a real database. Then finally, get rid of ODBC drivers and Access on the clients and

Re: Column names have spaces in them!!!

2006-02-01 Thread Alexander Foken
Robert Hicks wrote: Alexander Foken wrote: You need to pass the quotes to the SQL engine. And by the way, you should either use parameters or the quote function for values: my $sth=$dbh-prepare('select * from taskhours_per_date where employee name=?'); $sth-execute('NAME HERE'); Maybe MS

Re: Column names have spaces in them!!!

2006-02-01 Thread Darren Duncan
At 9:44 AM +0100 2/1/06, Alexander Foken wrote: You could slowly migrate your system, a first step would be to make sure all table and column names match /^[A-Za-z][A-Za-z0-9_]+$/. Next, move the tables and the business logic to a real database. Then finally, get rid of ODBC drivers and Access

Re: Column names have spaces in them!!!

2006-02-01 Thread Alexander Foken
Darren Duncan wrote: At 9:44 AM +0100 2/1/06, Alexander Foken wrote: You could slowly migrate your system, a first step would be to make sure all table and column names match /^[A-Za-z][A-Za-z0-9_]+$/. Next, move the tables and the business logic to a real database. Then finally, get rid of

Re: Re: Column names have spaces in them!!!

2006-02-01 Thread Tim Bunce
On Wed, Feb 01, 2006 at 02:08:32AM +0100, [EMAIL PROTECTED] wrote: use backticks instead of double quotes: my $sth=$dbh-prepare('select * from taskhours_per_date where `employee name`=?'); That's not portable. The DBI has a $dbh-quote_identifier method to abstract this and

Re: Column names have spaces in them!!!

2006-02-01 Thread Ron Savage
On Wed, 01 Feb 2006 13:36:41 +0100, Alexander Foken wrote: Hi Alexander Right. But using a restrictive set of characters for table and column names makes things easier. The column for the number of Just as I raved about back in 2003 :-):

Re: Column names have spaces in them!!!

2006-02-01 Thread Darren Duncan
At 9:30 AM +1100 2/2/06, Ron Savage wrote: On Wed, 01 Feb 2006 13:36:41 +0100, Alexander Foken wrote: Right. But using a restrictive set of characters for table and column names makes things easier. The column for the number of Just as I raved about back in 2003 :-): Now, I understand

Re: Column names have spaces in them!!!

2006-02-01 Thread Ron Savage
On Wed, 1 Feb 2006 15:46:31 -0800, Darren Duncan wrote: Hi Darren snip valid points It would be quite natural for such users to make identifiers like 'Person' and 'Home Address' and 'Home Telephone' and 'Work Telephone' and so on; it isn't natural for them to say 'Home_Telephone' and such.

Re: Column names have spaces in them!!!

2006-01-31 Thread paul . boutros
I believe you want square-brackets for Access: my $sth = $dbh-prepare(SELECT * FROM taskhours_per_date WHERE [EMPLOYEE NAME] = ?); Paul Quoting Robert Hicks [EMAIL PROTECTED]: I am using the ODBC module to talk to an Access database. In that database some of the column names have spaces in

Re: Column names have spaces in them!!!

2006-01-31 Thread Alexander Foken
You need to pass the quotes to the SQL engine. And by the way, you should either use parameters or the quote function for values: my $sth=$dbh-prepare('select * from taskhours_per_date where employee name=?'); $sth-execute('NAME HERE'); Maybe MS Acesss has other ways to do this, especially

Re: Column names have spaces in them!!!

2006-01-31 Thread John Scoles
Ugg!! first coice is to rebuild the table second choice I found that wrapping the offending field name in [ ] worked with ODBC and OLE but I am not sure how this will workd with DBI? something like this SELECT * FROM taskhours_per_date WHERE [EMPLOYEE NAME] = 'NAME HERE' might work

Re: Column names have spaces in them!!!

2006-01-31 Thread Robert Hicks
Alexander Foken wrote: You need to pass the quotes to the SQL engine. And by the way, you should either use parameters or the quote function for values: my $sth=$dbh-prepare('select * from taskhours_per_date where employee name=?'); $sth-execute('NAME HERE'); Maybe MS Acesss has other ways

Re: Re: Column names have spaces in them!!!

2006-01-31 Thread perl
use backticks instead of double quotes: my $sth=$dbh-prepare('select * from taskhours_per_date where `employee name`=?'); Regards, Renee Am 31.01.2006 um 23:58 Uhr haben Sie geschrieben: Alexander Foken wrote: You need to pass the quotes to the SQL engine. And by the way, you should