Page 1 of 1

Aggregate the Data

Posted: Thu Jun 10, 2010 2:33 pm
by neeraj
HI,

I have a data

Stud Subject1 Subject2 Subject 3 Subject4
a1 Null Null 10 Null
a1 Null 5 Null Null
a1 Null Null Null Null
a1 Null Null Null Null

I want an output like
Stud Subject1 Subject2 Subject 3 Subject4
a1 Null 5 10 Null

To acheive it, used an aggregate function,group by Stud and used Max function and got the results like
Stud Subject1 Subject2 Subject 3 Subject4
a1 0 5 10 0

For Subject 2 ad 3, it is OK but for Suject 1 and Subject4, Insead of Null, I am getting 0. The data type is Small int.

Please let me know how can I get the expected results.

Regards
Neeraj

Posted: Thu Jun 10, 2010 2:42 pm
by neeraj
I found the solution.

By setting Allow Null Output=True.. I am getting the correct output.

Thanks
Neeraj

Posted: Thu Jun 10, 2010 4:34 pm
by ray.wurlod
Please mark thread as Resolved using green button at top. Well done for finding the solution.