Home Base de Datos postgresql Postgresql of type numeric but expression is of type character varying
mod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_counter
mod_vvisit_counterToday1627
mod_vvisit_counterYesterday7456
mod_vvisit_counterThis week15016
mod_vvisit_counterLast week48662
mod_vvisit_counterThis month146297
mod_vvisit_counterLast month200203
mod_vvisit_counterAll days2405781

We have: 71 guests, 24 bots online
Your IP: 54.234.42.16
 , 
Today: May 21, 2013
  • Facebook: pages/Syswoody/123814830970633
  • Twitter: syswoody
  • Linked In: pub/syswoody-syswoody/23/478/b58
  • Wikio: sources/www.syswoody.com/home-1GYQw
  • Picotea: http://picotea.com/es/canales/sistemas-woody
  • FeedBurner:
Postgresql of type numeric but expression is of type character varying PDF Imprimir E-mail

Intento hacer un insert en una tabla con el resultado de una select de otra con la suerte de un problema de conversion de parametros en varchar que deben ir a un decimal la solucion ha sido facil colocar un cast o bien lka funcion to_number

con la unica objeccion de controlar aquellos resultados que sean blancos si no ambas funciones os fallaran.

 

Opcion 1

 

select to_number(vprecio,'99,9999') from PreciosClientesVariaciones WHERE VPRECIO <> '';
Opcion 2
select CAST(vprecio AS DECIMAL) from PreciosClientesVariaciones WHERE VPRECIO <> '' ;