Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPDATE (DML) command does not recognize all filters #5066

Open
venanciofire opened this issue Sep 17, 2024 · 1 comment
Open

UPDATE (DML) command does not recognize all filters #5066

venanciofire opened this issue Sep 17, 2024 · 1 comment

Comments

@venanciofire
Copy link

venanciofire commented Sep 17, 2024

Details

UPDATE (DML) command does not recognize when the filter satisfies all conditions, for example if the record date is equal to today it is updating all fields mentioned in the SET but if it is different from today it recognizes all filter conditions and does not update. And even inserting in a Trigger the bug persists.

Steps to reproduce

UPDATE TBL_A
   SET NM_BANCO = FI.EMISSOR,
       DIAS_COMISSAO = julianday(IC.dt_fluxo_fim - IC.dt_fluxo_ini)
              
  FROM TBL_A AS IC
       INNER JOIN
       TBL_B AS FI ON (FI.APOLICE_AJUSTADA = IC.NR_CONTRATO) 
 WHERE 1 = 1
       AND IC.DT_COMISSAO = strftime('%d/%m/%Y', 'now') 
       AND FI.INSTRUMENTO = 'Fiança'
       AND FI.BOLETA_ATUAL = ( SELECT MAX(BOLETA_ATUAL) 
                               FROM TBL_B
                              WHERE APOLICE_AJUSTADA = IC.NR_CONTRATO
                         );

Operating system

Windows 11

SQLiteStudio version

v3.4.4

@JrgMyr
Copy link
Contributor

JrgMyr commented Oct 8, 2024

Hi Carlos.
Is that a "feature" of SQLite or of SQLiteStudio?
Can you reproduce the error with the original library from sqlite.org on the command line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants