Ver Mensaje Individual
  #2  
Antiguo 06-03-2013
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.057
Reputación: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Usa rpad, aunque el problema será que has declarado los campos en postgresql como char de longitud fija, en lugar de varchar.

Cita:
RPAD()

Available in: DSQL, PSQL
Added in: 2.1
Changed in: 2.5 (backported to 2.1.4)
Description: Right-pads a string with spaces or with a user-supplied string until a given length is reached.
Result type: VARCHAR or BLOB
Syntax:
RPAD (str, endlen [, padstr])
  • This function fully supports text BLOBs of any length and character set.
  • If str is a BLOB, the result is a BLOB. Otherwise, the result is a VARCHAR(endlen).
  • If padstr is given and equals '' (empty string), no padding takes place.
  • If endlen is less than the current string length, the string is truncated to endlen, even if padstr is the empty string.
Responder Con Cita