If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
I was trying to ruin a simple query checking the avreage of a column:
SELECT AVG(<COLUMN_NAME>) FROM <TABLE_NAME>
Got the folowing error:
[IBM][CLI Driver][DB2/NT] SQL0440N No authorized routine named
"AVG" of type "FUNCTION" having compatible arguments was found.
SQLSTATE=42884
I thought functions were just inhereent?!? I checked and don't see any AVG function owned by SYSIBM. Nor do I see MAX, MIN, etc.
Did someone not set up our database wrong?
__________________
Anthony Robinson
"If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."
That error message could also be an indication of an incompatible column type being supplied to the function. Try CASTing the column to something numeric.
My goof - incompatible column type. Chose the wrong column - works like a charm.
Please feel free to ridicule at will....
__________________
Anthony Robinson
"If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."