Firebird multiple rows in singleton select Where Like

321 Views Asked by At

I'm trying to get multiple rows with a like condition.

EXECUTE BLOCK 
   RETURNS (ID Varchar(128), SCRIPT  BLOB SUB_TYPE TEXT)
AS
BEGIN
FOR SELECT Col1.EID, Col1.Script 
FROM Col1
WHERE Col1.Script Like %test12%
INTO :ID, :SCRIPT
  DO
   BEGIN
     SUSPEND;
   END
END

Col1 looks like:

EID Script
1 "Hello test12, this is a Test"
2 "Hello test12, this is a second Test"

I get always error -811: multiple rows in singleton select. If I search for the problem everyone says make a for select, but it's not working.

Example in dbfiddle.

1

There are 1 best solutions below

0
On

From your log:

2021-09-22 14:53:38 D [00000a3a] Execute

You must use "Open" function instead of "Execute".