operador incorrecto para numeric and float8

Поиск
Список
Период
Сортировка
От Raul Breindembach
Тема operador incorrecto para numeric and float8
Дата
Msg-id 000401c15b6d$8e9e81c0$f07efea9@bookpc01
обсуждение исходный текст
Список pgsql-odbc
Hola a todos.
 
Estuve ausente durante un par de meses, pero ya vuelvo con todos los hierros, y con algún problemita.
 
He creado una tabla con la siguiente estructura:
 
Create table inventar
(
codigo Varchar(20) primary key,
dpto Decimal(10) Null,
descripcio Varchar(100) Null,
referencia Varchar(20) Null,
unidad Varchar(10) Null,
unidxgrupo Decimal(15,2)  default 0,
dgrupo Varchar(10) Null,
tipo Decimal(10) Null,
costo1 decimal(15,2) default 0,
costo2 decimal(15,2) default 0,
precio1 decimal(15,2) default 0,
precio2 decimal(15,2) default 0,
precio3 decimal(15,2) default 0,
preciop1 decimal(15,2) default 0,
preciop2 decimal(15,2) default 0,
exactual Decimal(15,2)  default 0,
examin Decimal(15,2)  default 0,
exmax Decimal(15,2)  default 0,
excento decimal(10) default 0,
exant Decimal(15,2)  default 0,
pvp1 decimal(15,2) default 0,
pvp2 decimal(15,2) default 0,
pvp1g decimal(15,2) default 0,
pvp2g decimal(15,2) default 0,
exdeposito decimal(15,2) default 0,
extienda decimal(15,2) default 0
);
 
Tengo un pequeño problema en mi programa, al ejecutar la siguiente instrucción:
 
Cn.Execute "Update inventar set exactual = (inventar.exactual - 1.5) where inventar.codigo = '01'"
 
--------------------------------------------------------------------
Microsoft Visual Basic
--------------------------------------------------------------------
Error '-2147467259 (80004005)' en tiempo de ejecución:
 
Error while executing the query (non-fatal);
ERROR: Unable to identify an operator '-' for types 'numeric' and
'float8'
 
you will have to retype this query using an explicit cast
 
--------------------------------------------------------------------
 
Lo cual no sucede al ejecutar la que sigue:
 
Cn.Execute "Update inventar set exactual = (inventar.exactual - 1) where inventar.codigo = '01'"
 
Claramente se nota dónde está el error, lo que no sé es como evitar que suceda, tengo la versión de PostgreSQL 7.1.1 y la versión 7.01.00.05 de PostgreSQL ODBC
 
Gracias por adelantado, acepto cualquier sugerencia.

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Denis Gasparin
Дата:
Сообщение: Re: Writing BLOBS to pgsql via ODBC using VB
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: Writing BLOBS to pgsql via ODBC using VB