Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Converted sql Query to Oracle

Converted sql Query to Oracle

Scheduled Pinned Locked Moved Database
helpdatabaseoracle
21 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S sandhya14

    see I have a storedprocedure in SQL 2005 and using SwissSql tool i have migrated that SP to oracle 10g. (that is the one which i have send) now when i execute this in oracle its giving an error the below: PL/SQL: ORA-00923: FROM keyword not found where expected

    V Offline
    V Offline
    Vimalsoft Pty Ltd
    wrote on last edited by
    #6

    I really dont know Oracle Syntax i have never worked with Oracle, let me ask a Friend mybe he can help. Please hold

    Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

    1 Reply Last reply
    0
    • S sandhya14

      see I have a storedprocedure in SQL 2005 and using SwissSql tool i have migrated that SP to oracle 10g. (that is the one which i have send) now when i execute this in oracle its giving an error the below: PL/SQL: ORA-00923: FROM keyword not found where expected

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #7

      I have a friend who can Help you interactively. Go to gmail and invite "Vuyiswamb" i dont have Oracle and i dont use it, i use only Microsoft SQL :)

      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

      S 1 Reply Last reply
      0
      • V Vimalsoft Pty Ltd

        I have a friend who can Help you interactively. Go to gmail and invite "Vuyiswamb" i dont have Oracle and i dont use it, i use only Microsoft SQL :)

        Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

        S Offline
        S Offline
        sandhya14
        wrote on last edited by
        #8

        ok thanks 4 ur reply..

        V 1 Reply Last reply
        0
        • S sandhya14

          ok thanks 4 ur reply..

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #9

          Cool :) Waiting for you in Gmail :)

          Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

          S 1 Reply Last reply
          0
          • V Vimalsoft Pty Ltd

            Cool :) Waiting for you in Gmail :)

            Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

            S Offline
            S Offline
            sandhya14
            wrote on last edited by
            #10

            i cant use Gmail in ofc..Pls tel him to help through ths (anyway i hv send u the query na)

            V 1 Reply Last reply
            0
            • S sandhya14

              i cant use Gmail in ofc..Pls tel him to help through ths (anyway i hv send u the query na)

              V Offline
              V Offline
              Vimalsoft Pty Ltd
              wrote on last edited by
              #11

              The Problem i dont have Oracle and neither he and will depend on you to run queries. he will help you debug it.

              Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

              S 1 Reply Last reply
              0
              • V Vimalsoft Pty Ltd

                The Problem i dont have Oracle and neither he and will depend on you to run queries. he will help you debug it.

                Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                S Offline
                S Offline
                sandhya14
                wrote on last edited by
                #12

                ok den tel me steps.. the problem is : WHERE ( Reporting_To = PEAP_SelectEmpAppraiser.AppraiserID) and nvl( Appraiser , '') = '' and emp_code not in ( select EmployeeID collate database_default from PEAP_SelectEmployeesByApr); here After the employeeid from keyword is missing its saying... here 'collate database_default' is there in between of employeeid and from keyword.. the SQL query is working with this.. but i doubt is there any specific format to be used for 'collate database_default'?

                V 1 Reply Last reply
                0
                • S sandhya14

                  ok den tel me steps.. the problem is : WHERE ( Reporting_To = PEAP_SelectEmpAppraiser.AppraiserID) and nvl( Appraiser , '') = '' and emp_code not in ( select EmployeeID collate database_default from PEAP_SelectEmployeesByApr); here After the employeeid from keyword is missing its saying... here 'collate database_default' is there in between of employeeid and from keyword.. the SQL query is working with this.. but i doubt is there any specific format to be used for 'collate database_default'?

                  V Offline
                  V Offline
                  Vimalsoft Pty Ltd
                  wrote on last edited by
                  #13

                  but why we need "collate database_default " here ?

                  Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                  S 1 Reply Last reply
                  0
                  • V Vimalsoft Pty Ltd

                    but why we need "collate database_default " here ?

                    Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                    S Offline
                    S Offline
                    sandhya14
                    wrote on last edited by
                    #14

                    if i remove am getting another error like : PL/SQL: ORA-00942: table or view does not exist not able to find out the temporary table 'PEAP_SelectEmployeesByApr'

                    V 1 Reply Last reply
                    0
                    • S sandhya14

                      if i remove am getting another error like : PL/SQL: ORA-00942: table or view does not exist not able to find out the temporary table 'PEAP_SelectEmployeesByApr'

                      V Offline
                      V Offline
                      Vimalsoft Pty Ltd
                      wrote on last edited by
                      #15

                      it is Difficult to help you.but your query is not complicated. try to run this separately before using them in sp, if they can run then they can run in a Sp.

                      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                      S 1 Reply Last reply
                      0
                      • V Vimalsoft Pty Ltd

                        it is Difficult to help you.but your query is not complicated. try to run this separately before using them in sp, if they can run then they can run in a Sp.

                        Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                        S Offline
                        S Offline
                        sandhya14
                        wrote on last edited by
                        #16

                        ya it is working separately also...

                        V 1 Reply Last reply
                        0
                        • S sandhya14

                          ya it is working separately also...

                          V Offline
                          V Offline
                          Vimalsoft Pty Ltd
                          wrote on last edited by
                          #17

                          Can you post separated parts here , i will tell you where you went wrong.

                          Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                          S 1 Reply Last reply
                          0
                          • V Vimalsoft Pty Ltd

                            Can you post separated parts here , i will tell you where you went wrong.

                            Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                            S Offline
                            S Offline
                            sandhya14
                            wrote on last edited by
                            #18

                            Am new to oracle...can u just help me to convert the given below sql query to oracle? create PROCEDURE [dbo].[PEAP_SelectEmployeesByAppraiser] ( @AppraiserID varchar(12) ) AS SET NOCOUNT ON; Create Table #PEAP_SelectEmployeesByAppraiser_All (EmployeeID varchar(6) null, SurNameFirstName varchar(150) ) Insert into #PEAP_SelectEmployeesByAppraiser_All SELECT emp_code AS EmployeeID, + emp_code + ' ' + l_name + ' ' + f_name AS SurNameFirstName FROM emp_master WHERE (Appraiser = @AppraiserID) Insert into #PEAP_SelectEmployeesByAppraiser_All SELECT emp_code as EmployeeID, + emp_code + ' ' + l_Name + ' ' + f_Name AS SurNameFirstName FROM emp_master WHERE (Reporting_To = @AppraiserID) and isnull(Appraiser,'') = '' and emp_code not in (select employeeid collate database_default from #PEAP_SelectEmployeesByAppraiser_All) Select Distinct EmployeeID, SurNameFirstName from #PEAP_SelectEmployeesByAppraiser_All

                            V 1 Reply Last reply
                            0
                            • S sandhya14

                              Am new to oracle...can u just help me to convert the given below sql query to oracle? create PROCEDURE [dbo].[PEAP_SelectEmployeesByAppraiser] ( @AppraiserID varchar(12) ) AS SET NOCOUNT ON; Create Table #PEAP_SelectEmployeesByAppraiser_All (EmployeeID varchar(6) null, SurNameFirstName varchar(150) ) Insert into #PEAP_SelectEmployeesByAppraiser_All SELECT emp_code AS EmployeeID, + emp_code + ' ' + l_name + ' ' + f_name AS SurNameFirstName FROM emp_master WHERE (Appraiser = @AppraiserID) Insert into #PEAP_SelectEmployeesByAppraiser_All SELECT emp_code as EmployeeID, + emp_code + ' ' + l_Name + ' ' + f_Name AS SurNameFirstName FROM emp_master WHERE (Reporting_To = @AppraiserID) and isnull(Appraiser,'') = '' and emp_code not in (select employeeid collate database_default from #PEAP_SelectEmployeesByAppraiser_All) Select Distinct EmployeeID, SurNameFirstName from #PEAP_SelectEmployeesByAppraiser_All

                              V Offline
                              V Offline
                              Vimalsoft Pty Ltd
                              wrote on last edited by
                              #19

                              AS i said before i dont do oracle, am not familiar with Oracle.

                              Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                              S 1 Reply Last reply
                              0
                              • V Vimalsoft Pty Ltd

                                AS i said before i dont do oracle, am not familiar with Oracle.

                                Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                                S Offline
                                S Offline
                                sandhya14
                                wrote on last edited by
                                #20

                                ok..thanks 4 ur kind help.

                                V 1 Reply Last reply
                                0
                                • S sandhya14

                                  ok..thanks 4 ur kind help.

                                  V Offline
                                  V Offline
                                  Vimalsoft Pty Ltd
                                  wrote on last edited by
                                  #21

                                  Welcome

                                  Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups