1 2 Previous Next 28 Replies Latest reply: Apr 4, 2013 9:27 PM by yxes2013 Go to original post RSS
      • 15. Re: Updating 2 tables side by side
        chekku
        Hi,

        Please find the below link, it may help you

        http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:164612348068

        Thanks,
        Chekku
        • 16. Re: Updating 2 tables side by side
          yxes2013
          You, hemant, and justin did not submit your assignment yet. :(
          Create a blog topic: How to setup active-passive (cold failover cluster) and provide script:
          For the managed script, I give you a hint:
          1.Check if Active node is down. 
             if  yes
                   shutdown abort all; 
                   kill all process; 
                   unmount shared disk; 
                   mount shared disk to passive node;
                   startup force oracle; 
                   check virtual ip bond;
             if no 
                 do nothing
          End Check
          thankssss
          • 17. Re: Updating 2 tables side by side
            EdStevens
            yxes2013 wrote:
            You, hemant, and justin did not submit your assignment yet. :(
            What makes you think we have "assignments" to submit?
            Create a blog topic: How to setup active-passive (cold failover cluster) and provide script:
            What does that have to do with the subject of this thread?
            For the managed script, I give you a hint:
            I don't need a hint. But I think you need a clue. You are looking more and more like a troll.

            1.Check if Active node is down. 
            if  yes
            shutdown abort all; 
            kill all process; 
            unmount shared disk; 
            mount shared disk to passive node;
            startup force oracle; 
            check virtual ip bond;
            if no 
            do nothing
            End Check
            thankssss
            • 18. Re: Updating 2 tables side by side
              yxes2013
              What makes you think we have "assignments" to submit?
              Cause you 3 are the core support in that topic forum :)
              What does that have to do with the subject of this thread?
              Well, it just a sidebit reminder, kind of pause for adz.
              I don't need a hint. But I think you need a clue. You are looking more and more like a troll.
              I did not yet really understand what troll is, I am assuming it means "pretty" , I like how the word sounds though, sounds like cinammon roll ;)
              • 19. Re: Updating 2 tables side by side
                yxes2013
                Hi Chekku,

                Based on the link from tom's answer, he has this sample:
                tkyte@ORACLE> update ( select a1, b1 from a, b where a.id = b.id )
                  2     set a1 = b1
                  3  /
                
                1 row updated.
                And this is mine:
                update ( select a.acrnumber, b.acrnumber from pictures2 a, signature2 b) 
                set a.acrnumber = b.acrnumber
                /                                                                                                                                       *
                ERROR at line 1:
                ORA-00904: "B"."ACRNUMBER": invalid identifier
                Why the error?

                Thankssss...
                • 20. Re: Updating 2 tables side by side
                  Justin_Mungal
                  yxes2013 wrote:
                  You, hemant, and justin did not submit your assignment yet. :(
                  Create a blog topic: How to setup active-passive (cold failover cluster) and provide script:
                  For the managed script, I give you a hint:
                  1.Check if Active node is down. 
                  if  yes
                  shutdown abort all; 
                  kill all process; 
                  unmount shared disk; 
                  mount shared disk to passive node;
                  startup force oracle; 
                  check virtual ip bond;
                  if no 
                  do nothing
                  End Check
                  thankssss
                  I know you are just trying to be funny, but you need to be a bit more respectful of our time and of the trust that your employer is putting in you. We've all worked very hard to get where we're at; we didn't learn what we know by constantly asking questions on forums. You owe it to yourself to do the same.
                  • 21. Re: Updating 2 tables side by side
                    sb92075
                    yxes2013 wrote:
                    Hi Chekku,

                    Based on the link from tom's answer, he has this sample:
                    tkyte@ORACLE> update ( select a1, b1 from a, b where a.id = b.id )
                    2     set a1 = b1
                    3  /
                    
                    1 row updated.
                    And this is mine:
                    update ( select a.acrnumber, b.acrnumber from pictures2 a, signature2 b) 
                    set a.acrnumber = b.acrnumber
                    /                                                                                                                                       *
                    ERROR at line 1:
                    ORA-00904: "B"."ACRNUMBER": invalid identifier
                    Why the error?

                    Thankssss...
                    oracle reports that B.ACRNUMBER does not exist

                    post results from
                    DESCRIBE SIGNATURE2
                    • 22. Re: Updating 2 tables side by side
                      yxes2013
                      Thanks ed and just :)
                      I know you are just trying to be funny, but you need to be a bit more respectful of our time and of the trust that your employer is putting in you.
                      We've all worked very hard to get where we're at; we didn't learn what we know by constantly asking questions on forums. You owe it to yourself to do the same.
                      Same with me too :(
                      Work and work and more work, I do not have even time for lovelife.
                      All my questions here is just a fraction of my work.
                      I read a lot too, but the problem is I got poor reading comprehension.
                      And I do often interpret differently what the docs had explained.
                      My chums sometime joke me as a no-common-sense?
                      I feels try my brain is like is like a computer chip, which understand or interprets data as bits of "0" & "1" only or "on" & "off" :)

                      Has anyone of you feels similarly?

                      Thankssss
                      • 23. Re: Updating 2 tables side by side
                        651776
                        Something like this?:

                        update table2
                        set idno =
                        (select t1.idno
                        from
                        (select rownum r, rowid ri
                        from table2) t2,
                        (select idno, rownum r
                        from table1) t1
                        where t2.r = t1.r
                        and t2.ri = table2.rowid)

                        Edited by: user648773 on 04/04/2013 22:49
                        • 24. Re: Updating 2 tables side by side
                          yxes2013
                          Thanks sb,
                          SQL> desc signature2
                           Name                                      Null?    Type
                           ----------------------------------------- -------- ----------------------------
                           TRANSID                                   NOT NULL NUMBER(20)
                           APPLICATIONID                             NOT NULL VARCHAR2(20)
                           ACRNUMBER                                          VARCHAR2(15)
                           DATECAPTURED                                       VARCHAR2(50)
                           SIGBMP                                             BLOB
                           SIGSIG                                             BLOB
                          or better yet create your own test table to prove it ;)


                          By the way, i noticed you are not participating in RAC topics, have you not experience yet building RAC?
                          But you already have lots of posts :)
                          You do also the assigment I gave to 2 justins, hemant, ed, billy, etc



                          Thanks
                          • 25. Re: Updating 2 tables side by side
                            yxes2013
                            Hi user6

                            Please test your solution first :)
                            SQL>
                            update signature2
                            set acrnumber =
                            (select t1.acrnumber
                            from
                            (select rownum r, rowid ri
                            from signature2) t2,
                            (select acrnumber, rownum r
                            from pictures2) t1
                            where t2.r = t1.r
                            and t2.ri = t1.r);
                            SQL>   2    3    4    5    6    7    8    9   10
                            and t2.ri = t1.r)
                                      *
                            ERROR at line 10:
                            ORA-00932: inconsistent datatypes: expected ROWID got NUMBER
                            Thankssss
                            • 26. Re: Updating 2 tables side by side
                              yxes2013
                              Its so weird here? where have the experts gone? summer vacation?
                              • 27. Re: Updating 2 tables side by side
                                651776
                                You make a mistake translating the query:

                                here is correct:

                                update signature2
                                set acrnumber =
                                (select t1.acrnumber
                                from
                                (select rownum r, rowid ri
                                from signature2) t2,
                                (select acrnumber, rownum r
                                from pictures2) t1
                                where t2.r = t1.r
                                and t2.ri = signature2.rowid);
                                • 28. Re: Updating 2 tables side by side
                                  yxes2013
                                  wow! you are the genius I am looking for!!! :D
                                  you made my lifer easy ;)
                                  What part is sql docs did you relate it to?

                                  Thakssssssss

                                  Lest give a BIG hand to user648773....better change your handle so i can introduce you to bossing larry :)
                                  1 2 Previous Next