0
I can’t find what’s wrong with these conversions :
INSERT INTO @RESULTADO
SELECT @DATA_REF as data_ref,
@EMPRESA as empresa,
@LOCAL as local_loja,
Month(@DATA_REF) as mes,
Year(@DATA_REF) as ano,
Sum(ISNULL(VE.EXTSLDPOS * VE.PRECO1, 0)) as saldo,
Cast(Month(@DATA_REF) AS VARCHAR(2)) + '/'
+ Cast(Year(@DATA_REF) AS VARCHAR(4)) AS ANO_MES,
-- AQUI DAR O ERRO.
DECLARE @RESULTADO TABLE
(
data_ref DATETIME,
empresa INT,
mes INT,
ano INT,
saldo DECIMAL(15, 7),
ANO_MES VARCHAR(7),
local_loja INT,
DESCRICAO VARCHAR(30)
)
apparently the error is self explained: convert numeric to varchar
– Rovann Linhalis
But like, I cast the month and year to sweep,
– Artur Bruno
pq does not use date formatting instead of concatenating ?! which bd is using ?
– Rovann Linhalis
That’s sql Server, right?
– Jefferson Quesado
yes,sqlserver14
– Artur Bruno
@Arturbruno managed to solve his problem?
– João Martins