Didn't find a better way to format a multiline string than this way... seems complicated. What would be the best way to format this type of code?
l_qry := "SELECT%
% * %
%FROM %
% enumerate %
%WHERE %
% " + {like item_prototype}.Primary_key_db_column_name + " = " + l_category_id + " %
%UNION %
% SELECT %
% e.* %
% FROM %
% enumerate e %
%INNER JOIN %
% enumerates_leaves s ON s." + {like item_prototype}.Primary_key_db_column_name + " = e." + {like item_prototype}.Category_db_column_name + " %
%) SELECT * FROM enumerates_leaves WHERE enumerates_leaves." + {like item_prototype}.Category_db_column_name + " IS NOT NULL;"