projects
/
koha-dla
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b9e833
)
update items.lastdateseen
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 6 Oct 2018 11:51:34 +0000
(13:51 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 6 Oct 2018 11:51:34 +0000
(13:51 +0200)
update.sql
[new file with mode: 0644]
patch
|
blob
diff --git a/update.sql
b/update.sql
new file mode 100644
(file)
index 0000000..
ec84634
--- /dev/null
+++ b/
update.sql
@@ -0,0
+1,11
@@
+update items as a
+inner join (
+ select ffzg_inventura.barcode,items.datelastseen,max(ffzg_inventura.date_scanned) as date_scanned
+ from ffzg_inventura
+ join items on items.barcode = ffzg_inventura.barcode
+ group by ffzg_inventura.barcode
+ having datelastseen < max(date_scanned)
+) as b
+on a.barcode = b.barcode
+set a.datelastseen = b.date_scanned ;
+