diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-23 22:12:57 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-26 09:40:02 +0100 |
commit | 9d277d3b33d33aa1f8454c1d525262bb698e2d38 (patch) | |
tree | 0d5c5ffccfd5b09a5e2456c102755eee36e0fdb4 /openbsc | |
parent | e3018c7ad643d6f0cc0e7df0544670a8dca754a3 (diff) |
sms: Add a script to query for unsent SMS
This is generating the query statement. It can be used to
play with database indexes and such.
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/contrib/sms/hlr-query.st | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/contrib/sms/hlr-query.st b/openbsc/contrib/sms/hlr-query.st new file mode 100644 index 000000000..bd3f97a4a --- /dev/null +++ b/openbsc/contrib/sms/hlr-query.st @@ -0,0 +1,10 @@ +"Query for one SMS" + +Eval [ +1 to: 100 do: [:each | + Transcript show: 'SELECT SMS.* FROM SMS + JOIN Subscriber ON SMS.receiver_id = Subscriber.id + WHERE SMS.id >= 1 AND SMS.sent IS NULL AND Subscriber.lac > 0 + ORDER BY SMS.id LIMIT 1;'; nl. +]. +] |