Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/04/2013, 13:42
gus_anomaly
 
Fecha de Ingreso: noviembre-2009
Mensajes: 381
Antigüedad: 14 años, 5 meses
Puntos: 6
Crear funcion escalar simple

Estimados, estoy tratando de crear una funcion muy simple, de forma tal que cuando la llame me devuelva 5 caracteres, es tan simple que no me sale! :P

Aqui algo que intenté hacer:

Código SQL:
Ver original
  1. GO
  2. CREATE FUNCTION getPuertoDestino
  3. (
  4.    
  5. )
  6. RETURNS CHAR(5)
  7. AS
  8. BEGIN
  9.     RETURN 'XXXXX';
  10. END
  11. GO


Muchas gracias!
Gustav.