• If i got your question right, you wish to have a total of 40 spaces in your output after concatenating column1 and column2?

    If so this should help you.

    create table t(x int,y int);

    insert into t values (123234,10);
    insert into t values(23,12);
    insert into t values(1234,12);

    select concat(concat(x,y),replicate(' ',40-datalength(concat(x,y))))
    from t;