[ic] RE: [query] help ... still

Dan Browning interchange-users@icdevgroup.org
Sun Jul 28 17:31:01 2002


At 02:06 PM 7/28/2002 -0700, you wrote:
>I get a blank response.  I've tried
>
>[query sql="SELECT sku, quantity, subtotal, order_number FROM orderline
>ORDER BY sku"
>       type=list
>       more=1
>         ml=50]
>...
>[/query]
>
>
>This works great.
>
>This, however does NOT work:
>[query sql="SELECT orderline.sku as o_sku, quantity, subtotal, order_number
>FROM orderline ORDER BY sku"
>       type=list
>       more=1
>         ml=50]
>... (of course listing [sql-param o_sku] as one of the return fields.)
>[/query]
>
>I try even the benign:
>[query sql="SELECT sku AS sku, quantity, subtotal, order_number FROM
>orderline ORDER BY sku"
>       type=list
>       more=1
>         ml=50]
>...
>[/query]
>
>I get nothing back.
>
>Even [query sql="SELECT sku, quantity, subtotal, order_number FROM orderline
>GROUP BY sku"
>       type=list
>       more=1
>         ml=50]
>...
>[/query]
>returns a blank result.
>___________________________
>
>I'm going to try (AGAIN) to accomplish this with the IC search tags, but...
>SQL should work.  IC is so amazing and so sophisticated.  It seems ludicrous
>to me that I can't create a simple 2-table report.  I'm even considering
>downloading my tables into Access so I can be guaranteed access to the
>information.  Eventhough I own Access, I'm morally opposed to using it!!
>(aside from the fact that I'll have to download my tables 4 times each
>weekend.) Please help me.  I KNOW there's a way to fix it in IC.
>
>Thanks again for wading through this.
>Jordan

We know that table joins work because a lot of us use them all the time in 
IC.  However, I've never tried them on GDBM, which is the default IC 
database -- which brings up the question: what kind of database are you 
using?  If you can, try enabling query logging on it to see what kind of 
queries are being passed by IC to the SQL backend .  For the PgSQL RPM on 
Linux, it is a matter of modifying the /etc/init.d/postgresql, MySQL is 
similarly easy (unless you're on a virtual host).

+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Dan Browning, Kavod Technologies <db@kavod.com>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"I'd love to go out with you, but the last time I went out, I never
came back."