Hi Set,

because I was in hurry and did not optimize enough.

Point goes to you. 😉

András

From: firebird-support@yahoogroups.com 
[mailto:firebird-supp...@yahoogroups..com]
Sent: Friday, June 15, 2018 11:09 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Delete issue


Good to see that the issue is solved, but of curiosity: Why not simply

delete from tplan_kw_pos a
where not exists( select * from tauftr_ge b
            where a.auftragsjahr = b.jahr
              and a.auftragsnr = b.nr<http://b.nr> )

Set

2018-06-15 10:38 GMT+02:00 Omacht András aoma...@mve.hu<mailto:aoma...@mve.hu> 
[firebird-support] 
<firebird-support@yahoogroups.com<mailto:firebird-support@yahoogroups.com>>:
Hi Anonymous!

I think you sould check and run if correct this statement:

delete from tplan_kw_pos x
  where not exists (select 1
                      from tplan_kw_pos a
                        inner join tauftr_ge b on a.auftragsjahr = b.jahr and 
a.auftragsnr = b.nr<http://b.nr>
                      where a.id<http://a.id> = x.id<http://x.id>)

András

From: firebird-support@yahoogroups.com<mailto:firebird-support@yahoogroups.com> 
[mailto:firebird-support@yahoogroups.<mailto:firebird-support@yahoogroups.>.com]
Sent: Friday, June 15, 2018 10:19 AM
To: firebird-support@yahoogroups.com<mailto:firebird-support@yahoogroups.com>
Subject: [firebird-support] Delete issue


Hello,

I would like to delete all records, where no order number already exists in the 
table tauftr_ge. Here an example of the statement:

delete from tplan_kw_pos x where x.id<http://x.id> =  (select a.id<http://a.id> 
from tplan_kw_pos a left join tauftr_ge b on a.auftragsjahr = b.jahr and 
a.auftragsnr = b.nr<http://b.nr> where b.nr<http://b.nr> is null and 
a.id<http://a.id> = x.id<http://x.id>)


I get an error, The cursor identified in the UPDATE or DELETE statement is not 
positioned on a row.
no current record for fetch operation.

It looks simple, delete some records, but what can be wrong?

Thank you.





__________ Information from ESET Mail Security, version of virus signature 
database 17555 (20180615) __________

The message was checked by ESET Mail Security.
http://www.eset.com



__________ Information from ESET Mail Security, version of virus signature 
database 17555 (20180615) __________

The message was checked by ESET Mail Security.
http://www.eset.com



[Non-text portions of this message have been removed]



------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links






__________ Information from ESET Mail Security, version of virus signature 
database 17555 (20180615) __________

The message was checked by ESET Mail Security.
http://www.eset.com


[Non-text portions of this message have been removed]

  • RE: [firebird-s... Omacht András aoma...@mve.hu [firebird-support]
    • Re: [fireb... Svein Erling Tysvær setys...@gmail.com [firebird-support]
      • RE: [f... Omacht András aoma...@mve.hu [firebird-support]

Reply via email to