I'm trying to run a query and I can't figure out what's wrong here. I've consulted some people and they say my query looks right. The query I'm having problems with is the second one. Using a WHERE and a JOIN is giving me the following error:
Use of uninitialized value in substitution iterator at /usr/lib/perl5/ +site_perl/5.8.6/SQL/Parser.pm line 1596.
#!/usr/bin/perl use strict; use warnings; use DBI; # Connect to the database, (the directory containing our csv file(s)) my $dbh = DBI->connect("DBI:CSV:f_dir=.;csv_eol=\n;"); # Associate our csv disk file with the table names $dbh->{'csv_tables'}->{'info'} = { 'file' => "psinfooutputfile.csv"}; $dbh->{'csv_tables'}->{'hosts'} = { 'file' => "wmioutputfile.csv"}; $dbh->{'csv_tables'}->{'hostinfo'} = { 'file' => "hosts.csv"}; $dbh->{'csv_tables'}->{'saninfo'} = { 'file' => "sanhosts.csv"}; $dbh->{'csv_tables'}->{'software'} = { 'file' => "softwareinfo.csv"}; ###### $dbh->do("DROP TABLE IF EXISTS hostsinfo"); $dbh->do(" CREATE TABLE hostinfo AS SELECT hosts.IP, Manufacturer, Model, OS, OSSP, RAM, CPUSpe +ed, CPUCount, CPUType FROM hosts LEFT JOIN info ON hosts.IP = info.IP "); # Problem Query $dbh->do(" CREATE TABLE saninfo AS SELECT hostinfo.IP, Manufacturer, Model, OS, OSSP, RAM, CP +USpeed, CPUCount, CPUType, SOFT FROM hostinfo JOIN software ON hostinfo.IP = software.IP WHERE SOFT LIKE '%Secure Path%' ");
The "SOFT" column is from the software table.
Any ideas?

In reply to SQL Query Error by DrAxeman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.