General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Not sure why it wouldn't let me send this earlier, not throwing an error now
SET EXACT off
?"Rating file"
SELECT cdr && cdr is call records in previous
INDEX ON dnis TAG dnis &&DNIS is dialedNo
SELECT rate
index on code tag code desc &&code is dialCode
SET RELATION TO ALLTRIM(code) INTO cdr
SET SKIP TO cdr
replace cdr.rate with rate;
, cdr.dest WITH dest;
, cdr.code WITH code;
, cdr.billdur WITH IIF(cdr.duration >0,IIF(cdr.duration < rate.minimumsec,(rate.minimumsec/60),(CEiLING(cdr.duration/rate.increment)
/60*rate.increment)),0);
, cdr.charge with IIF(cdr.duration > 0,rate*cdr.billdur,0)
FOR empty(cdr.dest)
disregard the improper line changes within the code, it's just wrapping around
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only