Subject Re: [firebird-support] Problem with BLOB In Aggregate
Author Aage Johansen
perlmunger wrote:
> Seems like there is probably a simple answer to this, but I'm a bit
> new to Firebird to know what I'm missing. My query is attempting to
> get a sum of values from another table to include along with several
> columns in the main table. The problem is that when I have any columns
> in the main table that are BLOB types, I get the following error:
>
> "error: conversion error from string 'BLOB'"
>
>
> Whenever I remove the BLOB columns from the query, it works fine. Here
> is the query (MEDICAL.SHIPTO_COMMENT is the BLOB):
>
> SELECT MEDICAL.ORDER_NO,
> MEDICAL.CUSTOMER_ID,
> MEDICAL.PHYSICIAN_ID,
> MEDICAL.SALESPERSON_ID,
> MEDICAL.REFERRAL_ID,
> MEDICAL.SHIPTO_COMMENT,
> SUM( MEDICAL_ITEM.QTY_ORDERED * MEDICAL_ITEM.PRICE ) AS ORDER_TOTAL
> FROM MEDICAL
> INNER JOIN MEDICAL_ITEM ON MEDICAL.ORDER_NO = MEDICAL_ITEM.ORDER_NO
> WHERE MEDICAL.DELIVERY_ACTUAL IS NULL
> GROUP BY MEDICAL.ORDER_NO,
> MEDICAL.CUSTOMER_ID,
> MEDICAL.PHYSICIAN_ID,
> MEDICAL.SALESPERSON_ID,
> MEDICAL.REFERRAL_ID,
> MEDICAL.SHIPTO_COMMENT
> ORDER BY MEDICAL.ORDER_NO
>

Is "group by <blobfield>" permitted? Maybe you could cast it (within the
query) to a varchar?

--
Aage J.