in reply to Re: DBI w/ AnyData...works except on a couple of files...
in thread DBI w/ AnyData...works except on a couple of files...

Sorry I didn't see this earlier, I'm more likely to see things on comp.lang.perl.modules or dbi-users@perl.org. If you use the newest version of SQL::Statement with DBD::AnyData, it will catch those kinds of mistakes and warn you about them. It follows the SQL standard that names are composed of only alphanumerics and underscore and must start with an alphbetic character and be no longer than 128 characters and not be the same as a SQL reserved word. SQL Statement now allows quoted identfiers so characters like spaces and slashes are acceptable if used inside quotes. -- Jeff (author of the mods in question)
  • Comment on Re: Re: DBI w/ AnyData...works except on a couple of files...

Replies are listed 'Best First'.
Re: DBI w/ AnyData...works except on a couple of files...
by thoglette (Scribe) on Mar 13, 2003 at 07:58 UTC
    I'm currently seeing problems with embedded newlines in CSV files.
    Eg. data like the following file
    C:\TEMP>cat events.csv
    UKEY,CITY,DATE,TIME,TITLE,LOCATION,TYPE
    unkey1,perth,27-mar-03,3:15,"guru
    god",office,1
    unkey2,Melb,12-mar-03,3:15,"at last, at home",home,1
    
    on code like
    my $sth = $dbh->prepare("SELECT location, title FROM things"); $sth->execute(); while (my $row = $sth->fetch) {print "@$row\n"; }

    Version information

    • DBD::Anydata 0.05
    • SQL::Statement 1.005
    • Perl v5.6.1 built for MSWin32-x86-multi-thread