Subject Re: [firebird-support] What does SUBSTRING return?
Author Helen Borrie
At 03:19 PM 8/09/2004 +0200, you wrote:

>Hi,
>
> Helen's book doesn't answer all questions :-)
>
> What does substring (Internal function) return?
>
> e.g.
>
> SELECT '#'||substring('ABC' FROM 1 FOR 10)||'#' FROM rdb$database;
>
> returns #ABC#
>
> but in a stored procedure where ABC is a varchar variable it returns
> #ABC #
> (There is no char field in the sp. Of course ABC is a value from a
> variable which is a param of the proc...)
>
>
> Why?

Because you asked for 10 characters in the call!! You can't have butter on
both sides of the bread.

Helen