10-13-2004 11:19 AM - edited 03-13-2019 10:30 PM
Hello,
I'm issuing a DB Read that does some calculations and returns a recordset where the columns cannot be mapped to a given table. For example, "select sum(col1) as total from Sales".
The field "total" is not in the Sales table and therefore cannot be mapped to a variable using the standard DB Get method. Perhaps you can suggest the work-around for this.
Thanks,
Andrew
10-13-2004 09:08 PM
Hi Andrew,
can you try out as following
SQL query - Select sum(col1) col1 from sales.
Map the col1 to some local variable.
Note : you should use the same field name in alias also.
Try and let me know the result.
Regards
Yogi
10-14-2004 11:27 AM
That's a pretty clever workaround Yog, and will probably work under certain situations. What would you do if none of the column's data types match the variable that you would map them to? For example, you may want to average something where the result would be a decimal or float. If your table columns are only integer and string, you're stuck.
Luckily, in this situation the only manipulation that is needed is with date/time fields and I can do that on the IVR instead of the database.
Thanks for your reponse, as always.
-Andrew
10-14-2004 09:18 PM
Hi,
One method which I could think is developing custom java classes and using the same from CRS editor.
For creating custom java classes refer the following...
For CRA 2.2
http://www.cisco.com/univercd/cc/td/doc/product/voice/sw_ap_to/apps_22/dev_gd/sdkdeplo.pdf
From IPCC Express 3.0 and above, the documentation comes along with the software package. Check the same in IPCC Express Server
under Start->Programs->Cisco CRA Administrator->Component Developers Guide.
Regards
Yogi
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide