Error while trying to run an Update with Parameter in SQL

Asked

Viewed 82 times

1

I’m having a little problem that’s being a headache.

I want to update with a SET, where it involves two parameters concatenated.

Following update:

update tabela_usin  usin
  set usin.peca =  &P1 || ' ' ||&P11
 where usin.descricao = &P2
  and usin.complem = &P3;

When running appears the screen for me to put the values of my parameter:

inserir a descrição da imagem aqui

All are "STRINGS"

After I do Ok to give the update.

It returns as 0 updated rows

inserir a descrição da imagem aqui

At first I thought it might be the ' ' I put on my set. but maybe that’s not it.

What I am missing??

1 answer

-1


I put a LIKE operator in my Where

So you solved my problem

 update tabela_usin  usin
   set usin.peca =  &P1 || ' ' ||&P11
 where usin.descricao like '%&P2%'
   and usin.complem like '%&P3%';  

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.