Advertisement

05.10.2006 at 10:05AM PDT, ID: 21845467
[x]
Attachment Details

UPDATE SQL

Asked by chsrinivas123 in Oracle Database

Tags: update, sql

Detailed description of my question:
I have a table (CAS_SV_RQ_APVL_HST)which tracks how a task is moving from one user's queue to another.

I have these columns.
SVC_REQS_NBR,
COMP_REP_USER,
ROLE_NAME,
DATE_AVBL,
CRAT_DATE

For every SVC_REQS_NBR i have bunch of users and one task  moves from one user to another for that SVC_REQS_NBR.
Of these columns i have CRAT_DATE values which give when a task is completed by that user.I tried to ORDER BY CRAT_DATE  and using ROWNUM wanted to update DATE_AVBL for next user to be CRAT_DATE of previous user.

REASON FOR DOING THIS WHICH YOU MIGHT NOT EVEN CARE: I have correct CRAT_DATE for whole table but DATE_AVBL column is all messed up and hence i want this update.

please look at the UPDATE sql i tried and the error i got

 1  UPDATE
  2    ( SELECT ROWNUM,DATE_AVBL,CRAT_DATE,SVC_REQS_NBR FROM CAS_SV_RQ_APVL_HST
  3      WHERE ROLE_NAME = 'UP UM REVIEWER'
  4      ORDER BY CRAT_DATE
  5      ) a
  6     set DATE_AVBL = (select b.CRAT_DATE
  7               from (SELECT ROWNUM,DATE_AVBL,CRAT_DATE,SVC_REQS_NBR FROM CAS_SV_RQ_APVL_HST
  8                     WHERE ROLE_NAME = 'UP UM REVIEWER'
  9                     ORDER BY CRAT_DATE
 10                     ) b
 11          where b.ROWNUM = (a.ROWNUM - 1)
 12          AND b.SVC_REQS_NBR = a.SVC_REQS_NBR
 13*    )
SQL> /
        where b.ROWNUM = (a.ROWNUM - 1)
                *
ERROR at line 11:
ORA-01747: invalid user.table.column, table.column, or column specification
ORA-01747: invalid user.table.column, table.column, or column specification

Column descriptions :
 SVC_REQS_NBR                              NOT NULL NUMBER(10)
 CRAT_DATE                                 NOT NULL DATE
 COMP_REPR_USER                        NOT NULL VARCHAR2(7)
 ROLE_NAME                                 NOT NULL VARCHAR2(20)
 DATE_AVBL                                          DATE
 ACTN_DATE                                          DATE

ANY HELP WOULD BE REALLY APPRECIATED.
 

 Start Free Trial
[+][-]05.10.2006 at 10:12AM PDT, ID: 16650600

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.10.2006 at 10:14AM PDT, ID: 16650621

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 10:14AM PDT, ID: 16650622

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 10:19AM PDT, ID: 16650674

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 10:34AM PDT, ID: 16650831

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 11:16AM PDT, ID: 16651305

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 12:24PM PDT, ID: 16651963

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 12:25PM PDT, ID: 16651976

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 12:38PM PDT, ID: 16652086

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 12:40PM PDT, ID: 16652113

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 12:49PM PDT, ID: 16652193

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 12:57PM PDT, ID: 16652270

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 01:05PM PDT, ID: 16652330

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 01:16PM PDT, ID: 16652421

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 01:22PM PDT, ID: 16652481

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 01:42PM PDT, ID: 16652642

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 01:50PM PDT, ID: 16652721

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 01:51PM PDT, ID: 16652739

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 02:09PM PDT, ID: 16653015

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 02:36PM PDT, ID: 16653227

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Oracle Database
Tags: update, sql
Sign Up Now!
Solution Provided By: actonwang
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.10.2006 at 02:40PM PDT, ID: 16653268

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 02:55PM PDT, ID: 16653388

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 02:59PM PDT, ID: 16653417

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 03:11PM PDT, ID: 16653516

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2006 at 03:13PM PDT, ID: 16653526

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32