DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: View with values duplicates....

Threaded View

  1. #4
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142

    Angry

    The OS disk on my home server has just died - boo hoo! So I can't experiment, so this will need hacking . . .

    The following will identify the rows that are not N/A:
    Code:
    Select LS_ID, Max(RTYPE) MyType
    From   whatever
    Where  RTYPE <> 'N/A'
    Group  by LS_ID
    Having count(DISTINCT RTYPE) = 1
    You could outer join that sub-query (is that legal? *** - might need a work-around) to the original query, using NVL(MyType, 'N/A') to get the final value.

    It looked as if an analytic function was the answer, but I can't see it.


    *** Just seen examples of this on AskTom so its OK. Must have been thinking of Rdb or SQL/400 or something . . . ,
    Last edited by DaPi; 12-04-2004 at 03:38 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width