View Single Post
  #1  
Old 16th December 2018, 11:10 PM
Diniz
 
Posts: n/a
Default UPDATE multi column and UPDATE Blob Fields ERROR

HI

Considering 2 DATABASES
#1 JR_USOGERAL
#2 JR_MARILIA

and Fields Type

FOTO IS BLOB GRAPHIC
INFORMACAO IS BLOB MEMO

I Need INSERT and UPDATE Table from JR_USOGERAL to JR_MARILIA, keeping the
data synchronized

// INSERT (OK)
INSERT INTO JR_MARILIA.PRODUTOS SELECT * FROM CADPRODUTOS WHERE CODIGO =
:CODREPLICA;


// UPDATE
ERROR:
NexusDB: Query70402796: Query execution failed:
Unexpected exception object raised: [EInvalidCast] Invalid class typecast
[$3CA1/15521]

SELECT REFERENCIA, DESCRICAO, UNIDADE, FOTO, INFORMACAO
INTO #Temp
FROM JR_USOGERAL.CADPRODUTOS
WHERE CODIGO = 1;

UPDATE JR_MARILIA.PRODUTOS D
SET REFERENCIA = (SELECT REFERENCIA FROM #Temp),
DESCRICAO = (SELECT DESCRICAO FROM #Temp),
UNIDADE = (SELECT UNIDADE FROM #Temp),
FOTO = (SELECT FOTO FROM #Temp),
INFORMACAO = (SELECT INFORMACAO FROM #Temp)
WHERE CODIGO = 1;

Diniz
Brasil




---
Este email foi escaneado pelo Avast antiv?rus.
https://www.avast.com/antivirus