2009/11/3 paulo matadr <[email protected]>: > Galera , tenho a seguinte situação: > > create table teste_string( a int,b int ); > > > insert into teste_string values (111,22); > insert into teste_string values (112,223); > insert into teste_string values (13,224); > insert into teste_string values (114,225); > insert into teste_string values (15,226); > > select (to_char(a,'999'))||'.'||(to_char(b,'999')) as juncao from > teste_string > > o resultado ta vindo assim: > > select (to_char(a,'999'))||'.'||(to_char(b,'999')) as juncao from > teste_string; > juncao > ----------- > 111. 22 > 112. 223 > 13. 224 > 114. 225 > 15. 226 > (5 rows) > > 111. 22 colocando espaco entre os campos , como eu faço eliminar isso? >
Creio que ltrim(to_char(b,'999'),' ') resolve. http://www.postgresql.org/docs/current/interactive/functions-string.html Osvaldo _______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
