[Zope] How does dtml-sqlgroup really work?

Thomas B. Passin tpassin@mitretek.org
Fri, 7 Jun 2002 12:01:25 -0400


industry_group is supposed to be a variable known to the Zope namespace.  If
this variable doe snot exist, you would get the error you quote.  Make sure
you have created the variable and assigned it a value.

Cheers,

Tom P

[Jorge O. Martinez]

>
> Not sure if this is a DB question, or DTML question, so I'm sending it to
the
> general Zope list.
>
> I've been banging my head over this relatively simple query, which (if my
> understanding of the dtml-sqltest tag is correct), should be fine. The
idea is
> simple, get 3 columns from company_index, and display the results, if
there's
> further constrains set (like ticker, company_name, etc.), taylor the query
> accordingly:
>
> select company_name,ticker,primary_exchange
>   from
> company_index
> <dtml-sqlgroup where>
> <dtml-sqltest ticker op=eq type=nb>
> <dtml-sqltest company_name op=like type=nb>
> <dtml-sqltest industry_group op=eq type=nb>
> <dtml-sqltest industry_subgroup op=eq type=nb>
> <dtml-sqltest market_cap op=eq type=nb>
> <dtml-sqltest market_sector op=eq type=nb>
> <dtml-sqltest primary_exchange op=eq type=nb>
> </dtml-sqlgroup>
>
> but it's not happy. It keeps displaying errors like this:
>
> *************
>
> Zope has encountered an error while publishing this resource.
>
> Error Type: KeyError
> Error Value: industry_group