>Hi list,
>
>Firebird 2.5 Linux server.
>
>I'm trying to work around a bug in the FreePascal 2.6.0 compiler that thinks 
>all INSERT statements never return data. This >bug has been worked on since 
>but 2.6.0 is the last stable version so I'd prefer to be able to support that.
>
>I'm trying to fool the compiler and rewrite my query into something like 
>SELECT (INSERT INTO i (PATH) VALUES >('\somewhere\over\the\rainbow') RETURNING 
>ID) AS TheID FROM IMAGES i
>
>Any suggestions?

EXECUTE BLOCK RETURNS(TheID integer)
AS
BEGIN
  INSERT INTO i (PATH) VALUES ('\somewhere\over\the\rainbow') RETURNING ID INTO 
TheID;
  SUSPEND;
END

HTH,
Set

Reply via email to