Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

SQL error when accessing database..

Im using this sql select for retrieving som historical data :

select CSQ, sum(kaldIalt), sum(KaldTabt) from DEV_CSQR where Dato between '09/1/09' and '10/31/09' group by CSQ

When testing it - it returns 17 rows - working as designed.

when debugged, the DB Read works fine,

but the first DB get, throws a SQL error.

I think it's because of the sum.

Are there any way to get it working, without dropping the sum.

Regards

Steffen

3 REPLIES
Green

Re: SQL error when accessing database..

It is because of the SUM. If I recall correctly, the DB Get can only work on columns - be they in tables or in table views. I first encountered this when I wanted to return COUNT (*) to get the number of rows in a database matching X. There may be a workaround for that by now.

In your case, you may have to write a Java class that does the business. I prefer that method and don't use the DB steps, as it gives much more control over the results returning, complex SQL and stored procedure calls - but I'm a programmer.

Regards,

Geoff

New Member

Re: SQL error when accessing database..

ok..

In the step reference, they doesn't mention sum, but count - as not working.

i rewrote the script instead manually suming the total & missed calls.

Regards

Steffen

Green

Re: SQL error when accessing database..

Very good. It's working OK?

Regards,

Geoff

130
Views
3
Helpful
3
Replies
CreatePlease login to create content