IF (EXISTS(Select * from sys.sysprocedure where LCase(proc_name) = LCase('AlignRight'))) THEN Drop procedure AlignRight END IF GO create function DBA.AlignRight(in Str varchar(200),in Width integer) returns varchar(200) begin declare L integer; // set L=Length(Str); if L < Width then return(Space(Width-L) || Str) else // Usually the Left part is more significant than the right one, so it is // better to take IT when "Width" < L return("Left"(Str,Width)) end if end // [v. 04.04.2008] - Maria, izpolzva se za Export na fakturi