Menu

#1 Vendor Rating SQL cleanup

open
nobody
Backend (5)
5
2007-11-17
2007-09-19
No

When rating it selects for each trunk, why ...
shouldn't just a single query i.e. select * from cdr where uniqueid='1184039113.30' be enough?

SELECT * FROM cdr where lastapp = 'Dial' AND vendor = 'none' AND (dstchannel LIKE 'Zap/g1/%' OR dstchannel LIKE 'Zap[g1/]%' OR lastdata LIKE 'Zap/g1/%' OR lastdata LIKE 'Zap[g1/]%') AND uniqueid = ' 1184039113.30' AND disposition = 'ANSWERED'
SELECT * FROM cdr where lastapp = 'Dial' AND vendor = 'none' AND (dstchannel LIKE 'SIP/ipaddress%' OR dstchannel LIKE 'SIP[ ipaddress]%' OR lastdata LIKE 'SIP/ipaddress%' OR lastdata LIKE 'SIP[ipaddress]%') AND uniqueid = '1184039113.30' AND disposition = 'ANSWERED'
SELECT * FROM cdr where lastapp = 'Dial' AND vendor = 'none' AND (dstchannel LIKE 'SIP/ipaddress%' OR dstchannel LIKE 'SIP[ipaddress]%' OR lastdata LIKE 'SIP/ipaddress%' OR lastdata LIKE 'SIP[ ipaddress]%') AND uniqueid = '1184039113.30' AND disposition = 'ANSWERED'
SELECT * FROM cdr where lastapp = 'Dial' AND vendor = 'none' AND (dstchannel LIKE 'SIP/ipaddress%' OR dstchannel LIKE 'SIP[ ipaddress]%' OR lastdata LIKE 'SIP/ipaddress%' OR lastdata LIKE 'SIP[ipaddress]%') AND uniqueid = '1184039113.30 ' AND disposition = 'ANSWERED'
SELECT * FROM cdr where lastapp = 'Dial' AND vendor = 'none' AND (dstchannel LIKE 'SIP/ipaddress%' OR dstchannel LIKE 'SIP[ ipaddress]%' OR lastdata LIKE 'SIP/ipaddress%' OR lastdata LIKE 'SIP[ipaddress]%') AND uniqueid = '1184039113.30' AND disposition = 'ANSWERED'
SELECT * FROM cdr where lastapp = 'Dial' AND vendor = 'none' AND (dstchannel LIKE 'SIP/ipaddress%' OR dstchannel LIKE 'SIP[ipaddress]%' OR lastdata LIKE 'SIP/ipaddress%' OR lastdata LIKE 'SIP[ ipaddress]%') AND uniqueid = '1184039113.30' AND disposition = 'ANSWERED'
SELECT * FROM cdr where lastapp = 'Dial' AND vendor = 'none' AND (dstchannel LIKE 'SIP/ipaddress%' OR dstchannel LIKE 'SIP[ ipaddress]%' OR lastdata LIKE 'SIP/ipaddress%' OR lastdata LIKE 'SIP[ipaddress]%') AND uniqueid = '1184039113.30 ' AND disposition = 'ANSWERED'

Discussion

  • Aleph Communications

    • summary: Vendor rating enhancement --> Vendor Rating SQL cleanup
     
  • Aleph Communications

    • labels: --> Backend
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.