2
I have the following question. In SQL your doing so works.
...and coalesce(tb_cadastro.cod_produto,'') = coalesce(:COD_PRODUTO, coalesce(tb_cadastro.cod_produto,'')) and ...
Where the COD_PRODUTO
is an integer, as I would if the field is of the type DATE
? I tried that way, but I’m not getting a date.
...and coalesce(cast(tb_cadastro.dt_pallet AS varchar(10)),'') = coalesce(:DT_PALLET, coalesce(cast(tb_cadastro.dt_pallet AS varchar(10)),''))
you have already tried using this within select to see what it returns ?
– Marco Souza
But why are you giving one
cast
to turn the fielddate
invarchar
? If you turn tovarchar
, I think you’d have to do it with everyone, but you’re not turning the fieldDT_PALLET
.– Pedro Gaspar
Please Tiago, post the solution of the problem as an answer, instead of putting it directly in the question.
– Pedro Gaspar