Subject HOW TO USE COALESCE in BLOB(TEXT)?? is there any other way to do it?
Author Patrick Antonioli
Hello.. I have a test procedure... but I can´t make it work with the
COALESCE in the BLOB(TEXT) column ... how can I do it? is that possible? or
COALESCE is not made yet to work with blob´s ???

I changed from "=" to LIKE ... but keep not working...
I am using this because I have a form with nTextboxes (this ex is only with
2), and I wanto to make an search in the table based in the textboxes that
the user has filled out.
Shoul I use dynamic query??? like, create a varieble like
sql = "Select * from table WHERE 1=1"
If (var1 != null)
sql = sql + " columX = "+ var1 +" "
execute (sql)
??? is that possible? how do it? is there any other way? witch one is the
correct/fastest one?

Thanks

Patrick

----
SET TERM ^ ;
CREATE PROCEDURE spTbl_test5Clob_SelectSearch
(
"iid" INTEGER,
"iCLOB_FIELD" BLOB SUB_TYPE 1 SEGMENT SIZE 80
)
RETURNS
(
"id" INTEGER,
"CLOB_FIELD" BLOB SUB_TYPE 1 SEGMENT SIZE 80
)
AS
BEGIN
FOR
SELECT
"id",
"CLOB_FIELD"
FROM "test5Clop"
WHERE
COALESCE("test5Clob"."id", 0) = COALESCE(:"iid", "test5Clob"."id", 0) AND
COALESCE("test5Clob"."CLOB_FIELD", '') = COALESCE(:"iCLOB_FIELD",
"test5Clob"."CLOB_FIELD", '')
INTO
:"id",
:"CLOB_FIELD"
DO
BEGIN
SUSPEND;
END
END
^
SET TERM ; ^
GRANT SELECT ON "test5Clob" TO PROCEDURE spTbl_test5Clob_SelectSearch;
GRANT EXECUTE ON PROCEDURE spTbl_test5Clob_SelectSearch TO SYSDBA;
----


[Non-text portions of this message have been removed]