10-15-2009 01:31 PM - edited 03-14-2019 04:43 AM
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
10-16-2009 07:34 AM
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
10-16-2009 11:21 PM
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
10-17-2009 05:48 AM
Very good. It's working OK?
Regards,
Geoff
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