On 10 Sep 1997, Ed Schaefer wrote:
} Given:
} Unix: SCO
} Engine: 7.23 Online
} 4GL: 6.04
} I'm new to stored procedures and I'm trying to call a Stored Procedure
} from a 4GL program. I'm trying to call a stored procedure, sp_in_string,
} which checks if a substring is a string. Here's the 4GL stub:
[...sample code omitted -- but thanks for including it...]
} The problem is I'm getting a runtime syntax error: 661
} The number of variables on the left side of a LET statement does not
} match the number of values on the right side.
} CAN ANYONE POINT OUT MY ERROR? Thanks!
} Here's the Stored Procedure. Syntax appears correct:
Yes, mostly. It's a pity that the SPL compiler doesn't detect the -661
error at compile time -- it could!
} create procedure sp_in_string(pattern char(50), source_string
} char(512)) returning int;
[...omitted...]
} let buf_pattern = '*', pattern, '*';
Wrong string concatenation operator.
I4GL uses ',' but SPL uses ||.
Yours,
Jonathan Leffler (johnl@informix.com) #include <witticism.h>