Need help on Oracle SQL formulation

5 pts.
Tags:
Oracle
SQL
I have a requirement where data is as below:
ID            Date                 Comments 101         23/Jun/2018      RR: Insufficient resource 101         23/Jun/2018      Next week apply for leave
102         22/Jun/2018      NULL
103         21/Jun/2018      Go ahead I need a Oracle sql to fetch above data as ID     DATE                A_comments                       D_comments 101   23/Jun/2018    Next week apply for leave      RR: Insufficient resource
102   22/Jun/2018
103   21/Jun/2018     Go ahead
 
Whenever comment is with RR prefix it should go to D_comments . and without RR it should go to  A_comments.
Help me to achieve this.


Software/Hardware used:
oracle 11g
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    Post the code you have tried and any errors you are getting. Sounds simple enough to code and could be done a few ways. If this is a class assignment they may want you to use the methods covered not the one we may provide.
    134,790 pointsBadges:
    report
  • TheRealRaven
    Is it impossible to have two (or more) "RR" or non-"RR" comments for a single ID/Date combination? (How are such duplicates stopped?)
    36,045 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: