in reply to generated SQL statement problem (OT)

As others have noted, it looks ok. You can have columns in WHERE not referenced in the results set. Note that most RDBSMs won't allow a column reference in a sort that isn't in the select. But that's not your problem.

Two suggestions:

  1. Paste the generated SQL into an ISQL client and see if it runs. If so, there's a DBI or other Perl / MySql issue.
  2. If not, then start with a very simle query and add pieces one at a time to see where it breaks.
hth
  • Comment on Re: generated SQL statement problem (OT)

Replies are listed 'Best First'.
Re: Re: generated SQL statement problem (OT)
by AidanLee (Chaplain) on Jun 22, 2001 at 23:20 UTC
    Ok, a couple have mentioned it, but what i was trying to ask is does a TABLE need to be represented by one of its columns in the columns selected to be useable in the where clause.