MS SQL Server system stored procedures can't be migrated into Oracle 11g

During database migration from MS SQL Server 2008 to Oracle 11g R2, if the application stored procedure invokes the MS SQL Server system stored procedures (for example: sp_getapplock, sp_releaseapplock ....), these SQL server system stored procedures can't be transferred. See following migrated Oracle application stored procedure for example:
create or replace
PROCEDURE spPwSysID_GetNextID
v_ID OUT NUMBER,
iv_SysType IN NVARCHAR2 DEFAULT NULL ,
iv_Cnt IN NUMBER DEFAULT NULL
AS
v_SysType NVARCHAR2(50) := iv_SysType;
v_Cnt NUMBER(10,0) := iv_Cnt;
v_result NUMBER(10,0);
BEGIN
--SQL Server BEGIN TRANSACTION;
utils.incrementTrancount;
v_Systype := UPPER(v_Systype) ;
IF v_Cnt < 1 THEN
v_Cnt := 1 ;
END IF;
v_result :=sp_getapplock(v_Resource => v_Systype,
v_LockMode => 'Exclusive') ;
IF v_result >= 0 THEN
BEGIN
SELECT ID
INTO v_ID
FROM PWSYSID
WHERE SysType = v_SysType;
IF SQL%ROWCOUNT = 1 THEN
UPDATE PwSysID
SET ID = ID + v_cnt
WHERE SysType = v_SysType;
ELSE
BEGIN
INSERT INTO PwSysID
( ID, SysType )
VALUES ( v_cnt + 1, v_SysType );
v_ID := 1 ;
END;
END IF;
v_result :=sp_releaseapplock(v_Resource => v_Systype) ;
END;
ELSE
BEGIN
raise_application_error( -20002, 'Lock failed to acquire to generate Cityworks Id.' );
END;
END IF;
utils.commit_transaction;
END;

During database migration from MS SQL Server 2008 to Oracle 11g R2, if the application stored procedure invokes the MS SQL Server system stored procedures (for example: sp_getapplock, sp_releaseapplock ....), these SQL server system stored procedures can't be transferred. See following migrated Oracle application stored procedure for example:
create or replace
PROCEDURE spPwSysID_GetNextID
v_ID OUT NUMBER,
iv_SysType IN NVARCHAR2 DEFAULT NULL ,
iv_Cnt IN NUMBER DEFAULT NULL
AS
v_SysType NVARCHAR2(50) := iv_SysType;
v_Cnt NUMBER(10,0) := iv_Cnt;
v_result NUMBER(10,0);
BEGIN
--SQL Server BEGIN TRANSACTION;
utils.incrementTrancount;
v_Systype := UPPER(v_Systype) ;
IF v_Cnt < 1 THEN
v_Cnt := 1 ;
END IF;
v_result :=sp_getapplock(v_Resource => v_Systype,
v_LockMode => 'Exclusive') ;
IF v_result >= 0 THEN
BEGIN
SELECT ID
INTO v_ID
FROM PWSYSID
WHERE SysType = v_SysType;
IF SQL%ROWCOUNT = 1 THEN
UPDATE PwSysID
SET ID = ID + v_cnt
WHERE SysType = v_SysType;
ELSE
BEGIN
INSERT INTO PwSysID
( ID, SysType )
VALUES ( v_cnt + 1, v_SysType );
v_ID := 1 ;
END;
END IF;
v_result :=sp_releaseapplock(v_Resource => v_Systype) ;
END;
ELSE
BEGIN
raise_application_error( -20002, 'Lock failed to acquire to generate Cityworks Id.' );
END;
END IF;
utils.commit_transaction;
END;

Similar Messages

  • Requirements of SQL Server 2005 Stored Procedures to Develop Crystal Report

    Hi All,
       I want to learn how to create crystal report off of SQL Server 2005 Stored Procedure. So anybody please let me know from where I can download the documentation on "Requirements of SQL Server 2005 Stored Procedures for crystal report.
      I am using Crystal Report XI. Any help is greatly appreciated.
    Thank You.

    Hello,
    When CR uses Stored Porcedures we only look at the last SELECT statement. We can't use TMP tables because they are owned by the system and not the user. Even though you created them under your logon credentials you are not the actual owner. Or so I have found so far.... CR does not have permissions to get to those temp tables. If you can find out dynamically what the table names are called then it may work. I don't have a sample but it has the usual table info with a random GUID or temp name, really long, and changes every time.
    What should work is create a real table, not one of MS's tempTables and then push all your data to that table and then the last select statement returns all of your data from that temp table:
    SELECT * FROM MYTEMPTABLE.DBO.TABLE.
    Then CR should ahve no issues.
    It may be that the JDBC driver has problems. Test it using OLE DB or ODBC.
    Thanks again
    Don

  • BI Publisher 11g - calling SQL Server 2005 stored procedure error

    Hi experts
    I have been calling succesfully an SQL server 2005 stored procedure for the data model of a BI publisher report in 10g, passing it a customerNo parameter.
    EXEC     [dbo].[usp_WelcomeLettersConsumerNo]
              @CustomerNo = :sCustomerNo
    However it does not work in 11g I get the error:
    [Hyperion][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'is'.
    which is frustrating as there is no 'is' in the statement (perhaps it is picking up :s?) - I wonder does anyone know if there has been a change in 11g that may be causing this?
    cheers
    Tim

    Hi experts
    I have been calling succesfully an SQL server 2005 stored procedure for the data model of a BI publisher report in 10g, passing it a customerNo parameter.
    EXEC     [dbo].[usp_WelcomeLettersConsumerNo]
              @CustomerNo = :sCustomerNo
    However it does not work in 11g I get the error:
    [Hyperion][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'is'.
    which is frustrating as there is no 'is' in the statement (perhaps it is picking up :s?) - I wonder does anyone know if there has been a change in 11g that may be causing this?
    cheers
    Tim

  • Cannot execute a MS SQL Server 2005 Stored procedure via OSB BS

    I created the jca from Jdeveloper using DBAdapter. Then from eclipse I created the wsdl by generating the service. Then I imported all the relevant files in OSB console and created the business service. After executing the business service I get the below error (Pls scroll down).
    I tried many combination s. I tested with a stored procedure which returns only 1 row and 1 column and I hardcoded the column value. I also tried a stored procedure without any input parameters.
    I am sure there is no problem with the deployment of the datasource because I can execute operations to a table for select, update, delete using a business service following the above procedures.
    I created the stored proc following the same steps for select, update, delete. Also one more info is that when I call a stored proc from Oracle XE database it is working fine.
    My JDBC version is 4 . I am using the jar file provided by Microsoft that is sqljdbc4.
    Web Logic Server - 11gR1
    OSB - 11g + coherence + OEPE
    JDeveloper - 11.1.1.3.0
    can someone please help. This is very urgent. I have tried many combination's to get this to work from last 3 days without any luck.
    Help appreciated.
    Regards
    this happens only while executing the stored procedure.
    The invocation resulted in an error: Invoke JCA outbound service failed with application error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/NEHR_OSB/Lab/SvcNumb [ SvcNumb_ptt::SvcNumb(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'SvcNumb' failed due to: Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    ; nested exception is:
    BINDING.JCA-11811
    Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API.
    com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/NEHR_OSB/Lab/SvcNumb [ SvcNumb_ptt::SvcNumb(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'SvcNumb' failed due to: Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    ; nested exception is:
    BINDING.JCA-11811
    Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API.

    Hi,
    Even I am getting this kind of problem while executing a stored procedure from OSB.
    I have a stored procedure and i have created wsdl and xsd using JDEV. Now when i am creating a .biz with this wsdl and executing it , this is giving following error:
    <JCA_TRANSPORT_RUNTIME_APPLICATION_FAULT xmlns="http://www.bea.com/transport/2007/05/jca">
    oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/DBTest/TryDB [ TryDB_ptt::TryDB(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'TryDB' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the EAIUSER.DIM_Procedure API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ; nested exception is:
    JCA-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the EAIUSER.DIM_Procedure API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
    Please help me in solving this..

  • Pass unicode data in SQL Server 2008 stored procedure parameter

    Hi,
    I want to pass unicode data in a SQL stored procedure. But I am not sure that how to append N with NVarchar datatype.
    For example I Create a table LocalizationTest and wants to insert a few records.
    Create table LocalizationTest
        Field1 NVarchar(255)
    INSERT INTO LocalizationTest
    VALUES(N'123 Illini Dr, 東皮奧里亞, 8989')
    the above given statement works.
    To explain it more , script A works but script B does not work.
    DECLARE @X NVARCHAR(255)
    [A]
    SET @X=N '123 Illini Dr, 東皮奧里亞, 8989'
    INSERT INTO LocalizationTest
    VALUES(@X)
    [B]
    SET @X= '123 Illini Dr, 東皮奧里亞, 8989'
    INSERT INTO LocalizationTest
    VALUES(@X)
    What is the correct way to execute script B because @X will be passed in a SQL Stored Procedure?
    Thanks
    Sharma M.

    If you do not pass the value as a Unicode value there is nothing left of the Unicode characters but question marks. Once this has happened, AFAIK there is no way to undo it (other than resetting the value as Unicode characters again).
    Affirmative.
    Demo - This is what happens if you convert UNICODE (nvarchar) to varchar with implicit conversion (try to force 2 bytes into one byte).
    3F hex is '?'.
    CREATE TABLE #LocalizationTest (Field1 VARCHAR(255))
    INSERT INTO #LocalizationTest
    VALUES(N'123 Illini Dr, 東皮奧里亞, 8989')
    DECLARE @X NVARCHAR(255), @dSQL NVARCHAR(MAX)
    SET @X=N'123 Illini Dr, 東皮奧里亞, 8989'
    INSERT INTO #LocalizationTest VALUES(CONVERT(NVARCHAR(255),@X))
    SET @dSQL = N'INSERT INTO #LocalizationTest VALUES(N'''+@X+''')'
    PRINT @dSQL
    EXEC sp_ExecuteSQL @dSQL
    SELECT *, Field1Bin=convert(binary(30), Field1) FROM #LocalizationTest
    DROP TABLE #LocalizationTest
    123 Illini Dr, ?????, 8989 0x31323320496C6C696E692044722C203F3F3F3F3F2C203839383900000000
    123 Illini Dr, ?????, 8989 0x31323320496C6C696E692044722C203F3F3F3F3F2C203839383900000000
    123 Illini Dr, ?????, 8989 0x31323320496C6C696E692044722C203F3F3F3F3F2C203839383900000000
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Creation of System Stored Procedure in SQL Server 2012 & SQL Server 2012 R2.

    Hi all,
    I am stuck at a point I am looking for a system stored procedure named 'sp_dboption' in SQL Server 2012  & R2 but could not find.
    Searched for it on the net and found that, this stored procedure 'sp_dboption' is now obsolete. So I tried to copy the content of 'sp_dboption' stored procedure from SQL Server 2008 R2 and create new system stored procedure with this name 'sp_dboption' in
    SQL Server 2012 but was unable to create the system stored procedure.
    Can you guys please tell me how to create system stored procedure in SQL Server 2012 & SQL Server 2012 R2. The reason of why I want to achieve this is because I have used 'sp_dboption' system stored procedure  in my application to create a database.
    As 'sp_dbotion' stored procedure is present in SQL Server 2008 R2 I am able to create the database in SQL server 2008 R2 but not in SQL server 2012.
    Can you please guide me how to create system stored procedure. I am out of luck.
    Please assist me, thanks & looking for help at the earliest. Hope someone will come to the fore and help me.

    Hi Vishwajeet,
    If you tried to create any object in the sys schema, you will get the error below.
    The specified schema name "sys" either does not exist or you do not have permission to use it.
    So I am afraid creating any object in sys schema is not supported by SQL Server. Here is a similar link for your reference.
    How to create table in SYS schema in SQL Server?
    Though sp_dboption is not in SQL Server 2012, does creating a user-defined one with the same content in 2008 make any difference in your business? You just need to specify the fully qualified name dbname.dbo.sp_dboption.
    If you are still interested in creating a system sp_dboption, you can register it with the
    sp_ms_marksystemobject.
    See
    Creating Your Own SQL Server System Stored Procedures.
    Eric Zhang
    TechNet Community Support

  • How many sql server express instances i can install maximum in single system

    Hello Team,
    I want to install multiple sql express instances in single machine. My question is that how many instances of sql server express editions i can install in single machine ? 
    Thanks,
    Udaya Kumar
    udaya kumar

    For practical reasons as much as you like you probably would not exceed in any case 10 instances because after that resource crunch would start but any how you can read Max specification for SQL Server
    More accurate answer is "50 instances on a stand-alone server for all SQL Server editions."
    https://msdn.microsoft.com/en-us/library/ms143432.aspx
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • System stored procedure

    I am newbee in Oracle.
    Are there any system stored procedures in Oracle to create a file on file system, as in SQL Server such as xsp_UpdateSignalFile, sp_makewebtask.
    Pls advise.
    Thanks

    Thanks for the information.
    I want to create a file on windows file system. Is that feasible? I tried with below code but got errors.....
    PROCEDURE p_testproc
    IS
    v_file UTL_FILE.FILE_TYPE;
    v_filename varchar2(40):='dep.log';
    v_locat varchar2(200):='c:\tmp\';
    BEGIN
    dbms_output.put_line('proc begin.....');
    if UTL_FILE.is_open(v_file) then
    dbms_output.put_line('file opened');
    else
    dbms_output.put_line('file closed');
    end if;
    v_file:=SYS.UTL_FILE.FOPEN(v_locat,v_filename,'w');
    UTL_FILE.FCLOSE(v_file);
    dbms_output.put_line('File has been created');
    END p_testproc;
    Any help would be appreciated.
    Thanks in advance

  • Calling SQL * LOADER  in stored procedure

    Hi Experts,
    Can we call sql*loader in stored procedures? . If yes , please let me know the syntax.
    Any help will be highly appreciated.
    Thanks.

    You can also use dbms_schedular to execute any shell or batch file - i guess ->
    BEGIN
      -- UNIX
      DBMS_SCHEDULER.create_job(
        job_name             => 'unix_command_job',
        job_type             => 'EXECUTABLE',
        number_of_arguments  => 1,
        job_action           => '/bin/ls',
        auto_drop            => FALSE,
        enabled              => FALSE);
      DBMS_SCHEDULER.set_job_argument_value('unix_command_job',1,'/tmp');
      DBMS_SCHEDULER.set_attribute('unix_command_job', 'credential_name', 'TIM_HALL_CREDENTIAL');
      DBMS_SCHEDULER.set_attribute('unix_command_job', 'destination', 'marge.localdomain:65001');
      DBMS_SCHEDULER.enable('unix_command_job');
    END;For details ->
    http://www.oracle-base.com/articles/11g/SchedulerEnhancements_11gR1.php
    http://www.oradev.com/dbms_scheduler.jsp
    http://www.psoug.org/reference/dbms_scheduler.html
    Regards.
    Satyaki De.

  • How to execute .sql file in Stored Procedure?

    Hi,
    I have an urgent requirement, where i have to execute .sql file form Stored Procedure.
    This .sql file will have set of update statement. I need to pass value to this update statement.
    Kindly please help me.
    Regards,
    Irfan

    This is required as part of Data Migration where  i have to do 100 of table's update. Each time update table will defer, so its better to have in separate script file (.sql). Can u paste some sample/syntax to exceute .sql file from stored procedure. I am new to this PL/SQL.
    How have you determined that it's "better" to have seperate scripts?  I assume you mean the table name will "differ" (and not "defer" - I assume that's just because English isn't your first language? no problem - I think I understand what you're asking).
    So what I think you're asking is that you have dynamic table names but each table needs to be updated in the same way?
    Question: Why do you have tables with different names that all need the same process doing to them?
    Assuming it's a valid requirement (and 99% of the time doing dynamic coding implies it's not).... you could use dynamic code, rather than 'scripts'...
    e.g.
    create procedure update_table(tbl_name varchar2) is
    begin
      execute immediate 'update '||tbl_name||' set lastupdate = null';
    end;
    As you haven't bothered to provide a database version, any example code/data or explanation of what you're actually doing, you're not going to get any detailed answer.  Please do take the time to read the FAQ and post appropriate details so people can help you.

  • Replicating System Stored Procedures in MSA Setup

    I started replicating system stored procedures in my MSA environment due to the fact that commands such as sp_rename was not making it to my MSA server. This caused some issues downstream resulting in the DSI goign down and having to manually apply these statements on the target server.
    My question is, are there any cons/drawback to enabling such option
    In reading the manual one of the requirements was that
    Make sure that both the primary and replicate data servers are the same version of Adaptive Server.
    I am Replication from Sybase Cluster Edition 15.7 SP131 to Sybase SMP 15.7 SP131. So far I have not encountered any issues but I don't like surprises.
    Other requirements are met
    When replicating DDL – the primary and replicate databases must have the same login names and passwords; the DSI uses the original server login name and password to log in to the replicate database.
    For me the logins are identical on both servers so this is not an issue
    To replicate DDL and system procedures:
    Mark the primary database using sp_reptostandby.
    Set the RepAgent parameter send warm standby xacts to true—even if there is no standby database
    I also have a warm standby setup and I am using the logical connection as the primary dataserver so these conditions are also met
    Thanks

    I started replicating system stored procedures in my MSA environment due to the fact that commands such as sp_rename was not making it to my MSA server. This caused some issues downstream resulting in the DSI goign down and having to manually apply these statements on the target server.
    My question is, are there any cons/drawback to enabling such option
    In reading the manual one of the requirements was that
    Make sure that both the primary and replicate data servers are the same version of Adaptive Server.
    I am Replication from Sybase Cluster Edition 15.7 SP131 to Sybase SMP 15.7 SP131. So far I have not encountered any issues but I don't like surprises.
    Other requirements are met
    When replicating DDL – the primary and replicate databases must have the same login names and passwords; the DSI uses the original server login name and password to log in to the replicate database.
    For me the logins are identical on both servers so this is not an issue
    To replicate DDL and system procedures:
    Mark the primary database using sp_reptostandby.
    Set the RepAgent parameter send warm standby xacts to true—even if there is no standby database
    I also have a warm standby setup and I am using the logical connection as the primary dataserver so these conditions are also met
    Thanks

  • What is the data dictionary that stores the SQL text of stored procedures?

    I am handling both Oracle 8i on IBM AIX 5L and Oracle9i on SUN Soliars 8 /9.
    What is/are the data dictionary tables, or v$ views that store the SQL text of stored procedured and triggers?
    Thank you in advance!

    If the procedures are not wrapped, you can view them in the dba/all/user_source view. Trigger bodies can be seen in dba/all/user_triggers view.
    Message was edited by:
    Daniel Fink

  • Returning SQL cursor from Stored Procedure

    Hi,
    I have a query regarding returning sql cursor from stored procedure to java in oracle 11g.
    I want to query some data ex: my query returns A, B, C. Also, now I want to query some other data ex: D, E, F. Now I want to return this data as an sql cursor as a single row . Example: A,B,C,D,E,F. Is it possible to return/create a cursor in stored procedure?
    assume both query returns equal number of rows.. however both are not related to each other..

    RP wrote:
    Hi,
    I have a query regarding returning sql cursor from stored procedure to java in oracle 11g.
    I want to query some data ex: my query returns A, B, C. Also, now I want to query some other data ex: D, E, F. Now I want to return this data as an sql cursor as a single row . Example: A,B,C,D,E,F. Is it possible to return/create a cursor in stored procedure?
    assume both query returns equal number of rows.. however both are not related to each other..It sounds like what you need is a ref cursor.
    First thing to remember though is that cursors do not hold any data (see: {thread:id=886365})
    In it's simplest form you would be creating a procedure along these lines...
    SQL> create or replace procedure get_data(p_sql in varchar2, p_rc out sys_refcursor) is
      2  begin
      3    open p_rc for p_sql;
      4  end;
      5  /
    Procedure created.
    SQL> var rc refcursor;
    SQL> exec get_data('select empno, ename, deptno from emp', :rc);
    PL/SQL procedure successfully completed.
    SQL> print rc;
         EMPNO ENAME          DEPTNO
          7369 SMITH              20
          7499 ALLEN              30
          7521 WARD               30
          7566 JONES              20
          7654 MARTIN             30
          7698 BLAKE              30
          7782 CLARK              10
          7788 SCOTT              20
          7839 KING               10
          7844 TURNER             30
          7876 ADAMS              20
          7900 JAMES              30
          7902 FORD               20
          7934 MILLER             10
    14 rows selected.
    SQL> exec get_data('select deptno, dname from dept', :rc);
    PL/SQL procedure successfully completed.
    SQL> print rc
        DEPTNO DNAME
            10 ACCOUNTING
            20 RESEARCH
            30 SALES
            40 OPERATIONS
            50 IT SUPPORTWhich takes an SQL statement (as you said that both your queries were unrelated), and returns a ref cursor, and then your Java code would fetch the data using that cursor.
    Now, as for getting your rows to columns and combining two queries that do that... something along these lines...
    SQL> select * from x;
    C
    A
    B
    C
    SQL> select * from y;
    C
    D
    E
    F
    SQL> ed
    Wrote file afiedt.buf
      1  select x.col1, x.col2, x.col3
      2        ,y.col1 as col4
      3        ,y.col2 as col5
      4        ,y.col3 as col6
      5  from (
      6        select max(decode(rn,1,col1)) as col1
      7              ,max(decode(rn,2,col1)) as col2
      8              ,max(decode(rn,3,col1)) as col3
      9        from (select col1, rownum rn from (select * from x order by col1))
    10       ) x
    11  cross join
    12       (
    13        select max(decode(rn,1,col1)) as col1
    14              ,max(decode(rn,2,col1)) as col2
    15              ,max(decode(rn,3,col1)) as col3
    16        from (select col1, rownum rn from (select * from y order by col1))
    17*      ) y
    SQL> /
    C C C C C C
    A B C D E F... will do what you ask. For further information about turning rows to columns read the FAQ: {message:id=9360005}

  • SQL Server 2008 Express R2 exceeds the storage capacity of Oracle XE

    Hello, here is a novelty: SQL Server 2008 Express R2 exceeds the storage capacity of Oracle XE, XE you still limited to 4GB of data from, the competition gets better and offers a bit more, XE remains the same, hopefully Oracle 11g XE exceeds storage and memory to SQL Server.
    [http://www.microsoft.com/express/Database/]
    Roberto.
    Edited by: rober584812 on Apr 27, 2010 5:09 PM
    Edited by: rober584812 on Apr 27, 2010 5:09 PM

    Yes, I do good work is correct, I have not thought to migrate from Oracle XE to SQL Server Express because it could not work with the flexibility of PL / SQL and other Oracle features own, however, SQL Server 2008 R2 Express if takes the lead XE in storage, at which Oracle Corp. will match or exceed, offer more storage in response to competition and not only compensate for the limitation of 4GB with Excellency good features.
    Roberto.

  • Can we use hints in oracle 11g version ?

    can we use hints in oracle 11g version ? is it working ??

    Why do you ask these questions? Have you looked at the SQL Reference Guide and Performance Tuning Guide for your Oracle version - both which covers using hints?
    Have you see a statement that is not supported? Or does not work?
    Or are you simply doing idle speculation and expecting forum members to spend their free time in answering a basic question where the answer is ridiculously simply to find?

Maybe you are looking for

  • Can I use Home Sharing for this...

    I have 3 iphones (2 x 6's and 1 x 5), and an ipad, all of which I use one iTunes account. iTunes and Mac software all up to date Is it possible to use Home Sharing to sync them all exactly the same or is the a better/smarter way to do this. I have tr

  • Premiere Elements  12 wont run on my laptop

    Hi, I have a new laptop and I've just installed  Premiere Elements 12 but it wont run. When I create a new project I see the following message and as you can see there are no clues to what causing the issue. Organiser works fine. I've run a windows u

  • How can I only have my iphoto on the cloud and not in my HD?

    I ran out of HD on my Macbook Air. I want to have my photos only on iCloud. How can I do it?

  • TDS reversal on downpymt clearing- India

    Hi, I need to clear the down payment made against an invoice. The down payment made was net of TDS. While clearing the down payment, TDS deducted earlier should be reversed. Need help to resolve this. Thanks in advance Regards

  • I'd like to have the average of 2 y-values for 1 x-value

    Hello, I have acquired data from tests. The data is logged throughout a sweep. This means that for one X value I have got two Y values. Does anybody know how to get the averages so I got one graph. The data is stored in one channel. Thanks in advance