Hello again,
for all users with the same "problem":
I have created an update-trigger:
AS
begin
if(new.status = 5) then
begin
if (not exists (select 1 from t_pictures where status < 5 and kd_id =
new.kd_id
and li_id = new.li_id)) then
update t_pictures set status =
Hello,
another hint. All table-filds which are read are indicated. Each call of the
stored procedure get one result, the pc-program delete the folder and report
it to the database (other stored procedure). .until there is no other folder
to delete.
Thanks.
Hello Set,
the picture-pa
Hello Set,
the picture-path can be the status 1 (inserted), status 5 (storage-time has
expired and picture can be deleted) and status 6 (release to delete). A
NIO-Ray-image will be deleted after 2 month, a IO-ray-image after 72 hours.
If all pictures are deleted, I can delete the entire folder
>>try:
>>
>>select first 1 a.pfad
>>from t_pictures a where status <> 6 and
>>not exists (select 1 from t_pictures where status < 5 and kd_id = a.kd_id
>>and li_id = a.li_id)
>>into :pfad;
>>
>>(also first 1 will return just 1 record but it could be any record in the
>>set as you have no "order by"
Re: [firebird-support] Question about better performance Query
try:
select first 1 a.pfad
from t_pictures a where status <> 6 and
not exists (select 1 from t_pictures where status < 5 and kd_id = a.kd_id
and li_id = a.li_id)
into :pfad;
(also first 1 will return just 1 record but it could b
try:
select first 1 a.pfad
from t_pictures a where status <> 6 and
not exists (select 1 from t_pictures where status < 5 and kd_id = a.kd_id
and
li_id = a.li_id)
into :pfad;
(also first 1 will return just 1 record but it could be any record in the
set as you have no "order by")
Nick Upson
Hello,
at this time I have create an statement:
select first 1 a.pfad
from t_pictures a where status <> 6 and
(select count(*) from t_pictures where status < 5 and kd_id = a.kd_id and
li_id = a.li_id) = 0
into :pfad;
pfad = path for an file
Now we have thousands of record