Subject Re: Problem with BLOB In Aggregate
Author mikcaau
> > 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
> > >
> > > Thanks for your help.
> > >
> > > -Matt

Matt,
Is the error message from Fb or from your interface component?
An easy way to check is to run your query in another environment - ie
if it falls over in IboConsole then try DbWorkBench or some other -
and vice versa.
The reason I ask is that reference to "string 'blob'"

Another gotcha is that you aren't using table aliases and I seem to
recall that when full table name was used there were problems. I think
it was patched but can't be sure.
Perhaps you could alias the tables and try again.

Mick