FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
variable de Tipo Decimal envia error
Hola Chicos como estan nuevamente algo currioso con firebird:
estoy realizando un procedimiento que actualiza campos directamente con firebird
en fin como mencione en el código con un comentario me manda ese error. Saludos |
#2
|
||||
|
||||
A ver si te sirve:
Cita:
|
#3
|
|||
|
|||
La teoria dice:
Cita:
[color=#004465][font=Arial, sans-serif] ok entiendo eso ya que lo encontre directamente aquí: http://www.janus-software.com/fbmanu...=psql&topic=30 sin embargo al hacer esto:
Saludos |
#4
|
||||
|
||||
No lo he mirado a fondo, apenas un vistazo, pero cambia el decimal por numeric en todos.
|
#5
|
|||
|
|||
Sip ya lo habia hecho en todo y nada aun me da el error
Saludos casimiro y disculpa la molestia.. novato_erick |
#6
|
||||
|
||||
Pues cambia
COMISIONCOMPRA = 0.00 por COMISIONCOMPRA = 0 |
#7
|
|||
|
|||
Ok encontré el problema:
tube que declarar las variables con un valor por defecto:
Esto solucionó el problema: aunque al inicializar mis variables en 0 al principio del post no se porque no tomaban ese valor si no es que estan definido en la declaración. Extraño pero Casimiro Gracias por tu aporte dejo este link que me ayudó a comprender cuando usar numeric y decimal: https://firebird21.wordpress.com/201...ric-y-decimal/ Saludos a todos; |
#8
|
|||
|
|||
casimiro no habia visto tu post anterior jajajajaja
pero nuevamente Gracias amigo Saludos |
#9
|
||||
|
||||
Para hacer cálculos deberías usar double, independientemente que luego lo guardes en un campo numeric.
|
#10
|
|||
|
|||
Te refieres a DOUBLE PRECISION en Firebird directamente?
porque en Delphi si mis variables son double. Saludos |
#11
|
||||
|
||||
Sí, claro, en firebird.
Que uses numeric(15,2) por ejemplo, si vas a guardar importes con 2 decimales, pero eso es la definición del campo. Para hacer cálculos y no perder decimales, usa double precision. |
#13
|
||||
|
||||
Eso también
|
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
No se puede convertir variable de tipo null a tipo integer. | JairoC | Varios | 5 | 30-11-2011 15:43:11 |
Error en tipo de variable | astut | Internet | 6 | 25-02-2007 16:13:45 |
Como pasar la parte decimal de una variable | maravert | Varios | 1 | 30-10-2006 20:30:11 |
Vble. tipo decimal | silviodp | Varios | 2 | 11-05-2004 06:10:56 |
obtener el error que me envia SQL server | jac000y | MS SQL Server | 2 | 12-01-2004 20:47:00 |
|