2007/10/27, Drew Jensen <[EMAIL PROTECTED]>:
> Manuel NAUDIN wrote:
> > a simple query "PROD_QUERY" created in sql mode with direct sql on :
> > SELECT "id_prod", "prod_name" || ' ' || "prod_details" AS "product
> > description" FROM "PRODUCTS"
> >
> > What is unexpected (to me at least) is that if the "prod_details"
> > field is empty, "product_description" is empty too, although there's a
> > string in the "prod_name" field.
> >
> >
> Hi Manuel,
Hi Drew,
>
> That is the way HSQLdb handles it, the only way really to change that I
> suppose would be for HSQL to update their code. Which I think is in
> their tracking system for the 1.9 release, but don't quote me on that. I
> know I saw it in the mailing lists there a while back, but just now when
> I went to reference it I couldn't find it.
>
> Anyway - for today what you need to do is use the CONCAT  Function. Not
> as nice, but it does offer you the ability to then run the query in GUI
> designer mode, which you also can not do with versions of Base up to and
> including 2.3.1 ( I think I got that right ), OO.org 2.4 however will
> recognize the || function in the designer.
>
> SELECT
>   "id_prod",
>   CONCAT( "prod_name", CONCAT(  ' ', "prod_details") )
>     AS "product description"
> FROM "PRODUCTS"
ok, those imbricated CONCAT() are so error prone that I try not to use them ;-)
I'll have to double check the parentheses
Thanks
(the other way round was using some CASEWHEN() stuff ..umf)

Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to