Question about GridView control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey all,

Having some trouble with the GridView control and the Sorting functionality.

Using an Oracle datasource, we have a SqlDataSource control that uses a SQL
selet statement that contains some Oracle related function calling..

For example:

Select P.person_id,
upper(P.name_last)||upper(P.name_first) sort_field,
P.name_full,
decode(nvl(P.position_id,0),0,null,N.position_desc) position,
decode(nvl(P.org_id,0),0,null,O.org_name) org,
decode(nvl(P.dept_id,0),0,decode(P.department,null,null,
P.department),D2.dept_desc) dept,
P.per_phone, P.fax,
decode(nvl(P.owner_dept_id,0),0,null,D1.dept_desc) data_steward
from PERSONS P, DEPT_CODES D1, DEPT_CODES D2,
POSITION_CODES N, ORGANIZATIONS O
where P.owner_dept_id = D1.dept_id
and P.dept_id = D2.dept_id(+)
and P.position_id = N.position_id(+)
and P.org_id = O.org_id(+)


This statement works fine for the selection, but when we sort by one of the
fields that the DECODE function is being used on, it returns null data...

Please help.. thanks..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top