Subject Re: [firebird-support] What does SUBSTRING return?
Author Bjoern Reimer
>> 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?

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

Yes, but why is there a difference betwen PSQL and SQL?
I'm using RTrim UDF now so its no problem.
Just was wondering....

Or is ther another SQL-only solution to trim too long strings but not
to enlarge short without too many UDFs?


SOFTbaer --- reimer@... ---

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