Sybase ASE to Oracle 11g conversion

Hi,
Can anyone please look at the following Sybase ASE to Oracle 11g conversion - the top remarked code is the original Sybase version and the two UPDATE blocks below are hopefully doing the same task... What I need to know is if there is a more simple (less code change) way of doing the same task, either as a single UPDATE or preferably even more similar to the original Sybase code..?
-- /* now apply allocations */
-- update diary_items
-- set id_user = ia.id_user ,
-- tx_icon_user = 'urlcats:/user_grey.gif?method:getAllocationInfo'
-- from diary_items di,
-- item_allocation ia
-- where di.id_diary_item = ia.id_object
-- and ia.id_object_type = 'W'
-- and ia.id_user != 'autocats'
-- OK!
-- ??? Need to check if second UPDATE which is the same as above is required again...
/* now apply notes */
UPDATE diary_items
SET diary_items.tx_icon_user =
( SELECT 'urlcats:/user_grey.gif?method:getAllocationInfo'
FROM item_allocation
WHERE item_allocation.id_object = diary_items.id_diary_item )
WHERE EXISTS
( SELECT item_allocation.id_object
FROM item_allocation
WHERE item_allocation.id_object = diary_items.id_diary_item
AND item_allocation.id_object_type = 'W'
AND item_allocation.id_user != 'autocats' )
UPDATE diary_items
SET diary_items.id_user =
( SELECT item_allocation.id_user
FROM item_allocation
WHERE item_allocation.id_object = diary_items.id_diary_item )
WHERE EXISTS
( SELECT item_allocation.id_object
FROM item_allocation
WHERE item_allocation.id_object = diary_items.id_diary_item
AND item_allocation.id_object_type = 'W'
AND item_allocation.id_user != 'autocats' )
Many thanks!!!
Edited by: 881552 on 25-Aug-2011 04:39

I managed to work it out in the end - here's the solution...
/* now apply allocations */
update diary_items
set ( id_user,
tx_icon_user ) =
( select ia.id_user,
'urlcats:/user_grey.gif?method:getAllocationInfo'
from diary_items di,
item_allocation ia
where di.id_diary_item = ia.id_object
and ia.id_object_type = 'W'
and ia.id_user != 'autocats'
)

Similar Messages

  • Sybase ASE to Oracle Database 11g Migration

    Hi,
    I am looking for documentation on migration from Sybase ASE to Oracle Database 11g Migration.
    Front End application is Peoplesoft.
    Please suggest documentation on the same.
    I look forward to you reply.
    Best regards
    Sonali

    Have a look at the SQL Developer tool:
    Oracle SQL Developer</title><meta name="Title" content="Oracle SQL Developer"><meta n…
    It contains a migration utility which allows you to migrate foreign databases to Oracle:
    Database Migration Technology</title><meta name="Title" content="Database Migration Technology&q…
    Documentation and videos are available from the migration wbe page.
    - Klaus

  • Migrating Sybase code to Oracle 11g

    Hi All,
    We have to migrate Sybase code to Oracle 11g.
    When we are doing a SELECT .. INTO in Sybase , even if the query is returning more than 1 row , sybase selects 1 of the rows and populates the variables.
    But while migrating this code to oracle, we are getting TOO_MANY_ROWS Exception.
    We need to migrate the code from SYBASE to ORACLE without disturbing the logic.
    Can someone please tell me the logic applied by SYBASE to pick up the record?
    And if someone has faced this issue, then what can be done to resolve this.
    Regards,
    Riddhisha Khamesra

    The result 3 is the last entered record (not the amount of records..).
    So the first approach to write a dummy procedure that will select all records in Oracle like:
    CREATE OR REPLACE PROCEDURE last_record
    v_arg1 OUT NUMBER
    AS
    BEGIN
    SELECT col1
    INTO v_arg1
    FROM tt_tmp ;
    END;
    and hopefully returns only the last record will fail with:
    SQL> variable outvar number
    SQL> exec last_record (:outvar)
    BEGIN last_record (:outvar); END;
    ERROR at line 1:
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "SYSTEM.LAST_RECORD", line 9
    ORA-06512: at line 1
    One possible approach to get the last (and only the last) record that was entered into the table is to use rownum:
    The select might look like "select col1 from (select col1, rownum from tt_tmp order by rownum desc) where rownum=1;"
    So the procedure can be coded as:
    CREATE OR REPLACE PROCEDURE last_record
    v_arg1 OUT NUMBER
    AS
    BEGIN
    SELECT col1
    INTO v_arg1
    from (select col1, rownum from tt_tmp order by rownum desc) where rownum=1;
    END;
    Now calling it in SQL*Plus:
    SQL> variable outvar number
    SQL> exec last_record (:outvar)
    PL/SQL procedure successfully completed.
    SQL> print :outvar
    OUTVAR
    7
    The value 7 is the last record I've inserted into my tt_tmp table:
    SQL> select * from tt_tmp;
    COL1 COL2
    1 1
    2 2
    8 8
    7 7

  • Teradata database , sybase ASE and oracle database

    hi
    what are the difference between the architecture of teradata database and oracle db??
    i have some working experience on oracle database but none on teradata and sybase ASE.
    1)as per i know oracle schema is a user is the same in teradata and sybase ASE??
    2)what is the architecture teredata and sybase ASE follows as oracle doesn't.who have more benificial architecture ??
    3)teradata follows a transact sql (i guess) what is that??
    4) teradata have Backup Archive and Recovery feature is it same as RMAN in oracle??
    etc.
    kind regards

    hi
    suppose you want to grade oracle db,sybase,and teradata with in 10 what you will grade??
    from architecture and security perspective :==
    kind regards

  • SQL Developer 3.1 not migrating Sybase Users to Oracle 11g R2

    I have tried both online and offline capture and the Sybase users are not being captured (Tables, Views, Procedures Worked). I searched this forum and saw another post about this issue but the Oracle representative never came back with a final finding/answer. We have 1000+ users to migrate so all help is appreciated.

    Hello.
    sorry for the delay (if you need quicker response I suggest that you open a Service Request in My Oracle Support).
    In your first post you said that you tried online and offline migration. So for an offline migration you have created the scripts using the Create Database Capture Scripts menu button. Then you have run that scripts against Sybase. Has there been created a file SYB15_SYSUSERS.dat (or SYB12_SYSUSERS.dat if your Sybase version is 12)? If that file has been created, does it contain anything or is it empty?
    Regards
    Wolfgang

  • Migrate peoplesoft sybase HR database to oracle 11g

    Hi All,
    We am looking to migrate from sybase 12 to Oracle 11g. We are not sure on which path to choose for this migration to be done. Ths sybase Database is around 55 GB. Below are few questions. Please let me know. The down time on this database can not be more than 2 days at the max.
    1. What is the best and fastest way to do this, if there is one?
    2. Any Documentation on steps involved in migration?
    3. Do we have to use any 3rd party tools for this?
    4. Can we achieve the data migration with sql loader, if yes is it the suggested way to do this and is there any documentation on this?
    I tried sql developer to do the migration but it did not go well and finally found that it is not the way to migrate a Database with peoplesoft environment, below is the link to explain more about what I have done with sql developer.
    If there is any other information required, below link has almost all the information.
    Re: Migrate peoplesoft sybase HRMS database to oracle 11g
    Thanks
    Kranthi

    1)     Build an Oracle Demo system patched to the same release level as the current production system.
    2)     Launch Application Designer and compare the production system to the demo system so you may capture the modifications.
    3)     Load a custom table with the tables listed in the MVPRDEXP.EXP in the production system. Run a script to create an export script for all PSRECDEFN where the RECTYPE is 0. This identifies all application data tables. You may want to dms export large tables in parallel.
    4)     DMS Import the exported data into the Oracle instance.
    5)     Reapply the modifications.

  • Sybase group to oracle roles

    I've been testing Sybase to Oracle migration using SQL Developer 3.1.06 release. I dont see the user/groups on the Sybase is not getting converted in respective roles in Oracle. Am i missing something here? Any help is much appropriated.
    Thanks
    ~ G

    Looks like a open issue. My Query is very similar to one below. Any update on this? Is this a know issue on SQL Developer migration option for Sybase? Can someone confirm..
    SQL Developer 3.1 not migrating Sybase Users to Oracle 11g R2

  • Migrate peoplesoft sybase HRMS database to oracle 11g

    Hi All,
    I want to know if I can migrate a sybase peoplesoft HRMS database to oracle 11g using sql developer 3.0. I am trying to do this following the steps given in the link below but it is taking for ever for the convert step, I could see the messae saying building converted model.
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev/r30/SybaseMigration/SybaseMigration.htm
    The sybase database is 55GB and the version is 12. There are around 20,000 tables in Sybase Database.
    Please advise, if this is possible with SQL Developer??
    If yes, how long this process might take(for each step in the above link), based on any past convertions of the same size database??
    If this is not feasable with SQL Developer because of the complexity of the database, are there any other tools we can look into which might be faster/better than SQL Developer.
    Please advise.
    Thanks..

    Hi Dermot, Tanks for the reply.
    "Do you know the number of views and procedures captured". Below is the ouput from some of the tables in migration repositary.
    count from md_derivatives table, grouped by derived_type.
    MD_CATALOGS     1
    MD_USERS     1
    MD_CONNECTIONS     2
    MD_SCHEMAS     4
    MD_TRIGGERS     40
    MD_VIEWS     34316
    MD_TABLES     48048
    MD_INDEXES     55850
    MD_INDEX_DETAILS     112043
    MD_COLUMNS     766244
    Count from md_views table 34316
    Count from md_additional_properties table 110322
    "Is there a chance the convert phase has hung, or does it refresh ever so ofter with details of another object being "migrated"?"
    It is not hung. I can see the message 'Translating views' right now, and the View names change often but not fast roughly every minute. When I checked for what the session is doing, I could see the below two sql statements.
    SELECT PROP_KEY, VALUE, PROPERTY_ORDER, CONNECTION_ID_FK
    FROM MD_ADDITIONAL_PROPERTIES
    WHERE REF_ID_FK = :1
    ORDER BY PROPERTY_ORDER;
    SELECT ID
    FROM MD_TABLES -- Some times this is MD_VIEWS
    WHERE SCHEMA_ID_FK = :1 AND UPPER (TABLE_NAME) = UPPER (:2)
    "What is the current "Being migrated" information?"
    Translating View xxx.
    "Does the tablespaces your migration repository schema is based on have sufficient space?"
    Yes, Since there is no data at this point, it is all done in one table space which is set to grow UNLIMITED. At this point the size of the table space is a little over 500M.
    "Is SQL Developer being run on the same machine as the Oracle database containing the migration repository? (conversion can be alot quicker for procedure,view,trigger conversion if SQL Developer is on the same machine as the repository)"
    NO. SQL developer is running on my machine but the migration repositary is in the database which is on HP-UX box. Below are some of the details of the server. Also, since the database in on HP-UX, I couldn't find SQL developer for UNIX. I also read in the release note of 3.0 that it is not supported with UNIX, Is that right? else is there a way I can install SQL developer on the Unix server and that might improve the performance!, if yes, please guide me with the steps to do this installation.
    Server:
    Processors: 4, CPU version: PA 8700 CPU module 3.1, clock Frequency: 750MHz, Hardware Model: 900/800/L3000-7x, Kernel width Support 64.
    Physical Memory 8199.3 MB
    Real Memory --> Active: 2990487.0 KB, Total: 3956471.8 KB
    Virtual Memory --> Active: 5787735.5 KB, Total: 6864998.0 KB
    Free Memory Pages: 127049 at 4 KB/page
    Swap Space --> Avail: 4096 MB, Used: 4096 MB, Free: 0 MB
    OS Identification: B.11.11 U
    I see the below when I do a 'glance' on the server. Looks like it is using most of the memory and the Swap. These are the numbers from the server after the migration started, they stay consistent all time with very small variation.
    CPU Util S SR RU U | 34% 31% 39%
    Disk Util F F | 4% 4% 13%
    Mem Util S SU UB B | 93% 93% 93%
    Swap Util U UR R | 86% 86% 86%
    PROCESS LIST Users= 1
    User CPU Util Cum Disk Thd
    Process Name PID PPID Pri Name ( 400% max) CPU IO Rate RSS Cnt
    oraclefap 16560 1 178 oracle 97.9/98.3 132507 0.1/ 0.6 16.0mb 1
    My Machine where SQL Developer is Running
    Windows XP Professional SP3. 2GB Memoery. All this, time I was using around 1 Gb of memory while this process is running, Out of which SQL developer uses only 200 to 300 MB at any given point and the CPU is less than 5%.
    "What version of Oracle database have you installed the migration repository in?"
    Below is the Banner.
    Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    Also please let me know about this request I have popsted. https://apex.oracle.com/pls/apex/f?p=43135:7:2259365896228241::NO:RP,7:P7_ID:29361
    I would greatly appreciate any help. Thanks again.

  • Oracle to SAP Sybase ASE Migration

    Hi
    We are planing to migrate Solution Manger 7.1.
    Source : OS- HP-UX , DB - Oracle 11g
    Target : OS - SUSE Linux , DB - SYBASE ASE 15.7
    Can we migrate using normal system copy method ( heterogeneous) using SPM toool or is there any specific procedure/ steps need to follow ?
    Thanks
    Shashi

    Hi Shashi,
    You need to use SWPM tool and Heterogenous system copy to perform this migration.
    You may need to read some notes related to Sybase as mentioned below
    1734039 - SYB: Migration to Sybase ASE using unsorted unload/load
    1680803 - SYB: Migration to SAP Adaptive Server Enterprise - Best Practice
    1772967 - FAQ - Important SAP Notes - Sybase ASE
    Hope this helps.
    Regards,
    Deepak Kori

  • Converting Sybase ASE 11.5.1 to Oracle 8.1.6.0.0

    I want to migrate some Sybase ASE 11.5.1 databases to Oracle 8.1.6.0.0 Should I use the Oracle Migration Workbench 1.3.1.0.0 and create a separate Oracle home to install Workbench or should I use an older version of Workbench which installs into 8.1.6.0.0?
    Where can I find the older version of Workbench that installs into 8.1.6.0.0? I have searched the OTN pages and can't find an older version of Workbench. Thanks.

    Use the Oracle Migration Workbench 1.3.1.0.0 and create a separate Oracle home to install Workbench. The latest version of the workbench will have more features and more bugfixes.
    Turloch
    Oracle Migration Workbench Team

  • Oracle 11g performance issue ( BITMAP CONVERSION TO ROWIDS)

    I have two instance of oracle 11g.
    in both instance i fired same query.
    one instance returns the result in 1sec but other instance returns the result in 10 sec
    following is explain plan for bot instance
    instance 1
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 143 | 59 (2)| 00:00:01 |
    | 1 | HASH GROUP BY | | 1 | 143 | 59 (2)| 00:00:01 |
    | 2 | VIEW | VM_NWVW_2 | 1 | 143 | 59 (2)| 00:00:01 |
    | 3 | HASH UNIQUE | | 1 | 239 | 59 (2)| 00:00:01 |
    | 4 | NESTED LOOPS | | | | | |
    | 5 | NESTED LOOPS | | 1 | 239 | 58 (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    | 6 | NESTED LOOPS | | 1 | 221 | 57 (0)| 00:00:01 |
    | 7 | NESTED LOOPS | | 1 | 210 | 55 (0)| 00:00:01 |
    | 8 | NESTED LOOPS | | 1 | 184 | 54 (0)| 00:00:01 |
    | 9 | NESTED LOOPS | | 1 | 158 | 53 (0)| 00:00:01 |
    | 10 | NESTED LOOPS | | 1 | 139 | 52 (0)| 00:00:01 |
    | 11 | NESTED LOOPS | | 1 | 105 | 50 (0)| 00:00:01 |
    |* 12 | INDEX RANGE SCAN | year_field | 1 | 29 | 2 (0)| 00:00:01 |
    | 13 | SORT AGGREGATE | | 1 | 8 | | |
    | 14 | INDEX FULL SCAN (MIN/MAX)| idx_bf_creation_date | 1 | 8 | 2 (0)| 00:00:01 |
    |* 15 | TABLE ACCESS BY INDEX ROWID| OHRT_bugs_fact | 1 | 76 | 48 (0)| 00:00:01 |
    |* 16 | INDEX RANGE SCAN | idx_bf_creation_date | 76 | | 1 (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    |* 17 | TABLE ACCESS BY INDEX ROWID | OHRT_all_time_dimension | 1 | 34 | 2 (0)| 00:00:01 |
    |* 18 | INDEX UNIQUE SCAN | unique_alltime_bug_instance_id | 1 | | 1 (0)| 00:00:01 |
    | 19 | TABLE ACCESS BY INDEX ROWID | OHRT_all_time_dimension | 1 | 19 | 1 (0)| 00:00:01 |
    |* 20 | INDEX UNIQUE SCAN | unique_alltime_bug_instance_id | 1 | | 1 (0)| 00:00:01 |
    |* 21 | INDEX RANGE SCAN | bugseverity_instance_id_ref_id | 1 | 26 | 1 (0)| 00:00:01 |
    |* 22 | INDEX UNIQUE SCAN | unique_alltime_bug_instance_id | 1 | 26 | 1 (0)| 00:00:01 |
    | 23 | INLIST ITERATOR | | | | | |
    |* 24 | TABLE ACCESS BY INDEX ROWID | OHMT_ANL_BUCKET | 1 | 11 | 2 (0)| 00:00:01 |
    |* 25 | INDEX UNIQUE SCAN | SYS_C0053213 | 5 | | 1 (0)| 00:00:01 |
    |* 26 | INDEX RANGE SCAN | FK_BUCKET_TYPE | 6 | | 0 (0)| 00:00:01 |
    |* 27 | TABLE ACCESS BY INDEX ROWID | OHMT_ANL_BUCKET | 1 | 18 | 1 (0)| 00:00:01 |
    instance 2
    Plan
    SELECT STATEMENT ALL_ROWS Cost: 22 Bytes: 142 Cardinality: 1
    32 HASH GROUP BY Cost: 22 Bytes: 142 Cardinality: 1
    31 VIEW VIEW SYS.VM_NWVW_2 Cost: 22 Bytes: 142 Cardinality: 1
    30 HASH UNIQUE Cost: 22 Bytes: 237 Cardinality: 1
    29 NESTED LOOPS
    27 NESTED LOOPS Cost: 21 Bytes: 237 Cardinality: 1
    25 NESTED LOOPS Cost: 20 Bytes: 219 Cardinality: 1
    21 NESTED LOOPS Cost: 18 Bytes: 208 Cardinality: 1
    19 NESTED LOOPS Cost: 17 Bytes: 183 Cardinality: 1
    17 NESTED LOOPS Cost: 16 Bytes: 157 Cardinality: 1
    14 NESTED LOOPS Cost: 15 Bytes: 138 Cardinality: 1
    11 NESTED LOOPS Cost: 13 Bytes: 104 Cardinality: 1
    3 INDEX RANGE SCAN INDEX REPORTSDB.year_field Cost: 2 Bytes: 29 Cardinality: 1
    2 SORT AGGREGATE Bytes: 8 Cardinality: 1
    1 INDEX FULL SCAN (MIN/MAX) INDEX REPORTSDB.idx_bf_creation_date Cost: 3 Bytes: 8 Cardinality: 1
    10 TABLE ACCESS BY INDEX ROWID TABLE REPORTSDB.OHRT_bugs_fact Cost: 13 Bytes: 75 Cardinality: 1
    9 BITMAP CONVERSION TO ROWIDS
    8 BITMAP AND
    5 BITMAP CONVERSION FROM ROWIDS
    4 INDEX RANGE SCAN INDEX REPORTSDB.idx_OHRT_bugs_fact_2product Cost: 2 Cardinality: 85
    7 BITMAP CONVERSION FROM ROWIDS
    6 INDEX RANGE SCAN INDEX REPORTSDB.idx_bf_creation_date Cost: 2 Cardinality: 85
    13 TABLE ACCESS BY INDEX ROWID TABLE REPORTSDB.OHRT_all_time_dimension Cost: 2 Bytes: 34 Cardinality: 1
    12 INDEX UNIQUE SCAN INDEX (UNIQUE) REPORTSDB.unique_alltime_bug_instance_id Cost: 1 Cardinality: 1
    16 TABLE ACCESS BY INDEX ROWID TABLE REPORTSDB.OHRT_all_time_dimension Cost: 1 Bytes: 19 Cardinality: 1
    15 INDEX UNIQUE SCAN INDEX (UNIQUE) REPORTSDB.unique_alltime_bug_instance_id Cost: 1 Cardinality: 1
    18 INDEX UNIQUE SCAN INDEX (UNIQUE) REPORTSDB.unique_alltime_bug_instance_id Cost: 1 Bytes: 26 Cardinality: 1
    20 INDEX RANGE SCAN INDEX REPORTSDB.bugseverity_instance_id_ref_id Cost: 1 Bytes: 25 Cardinality: 1
    24 INLIST ITERATOR
    23 TABLE ACCESS BY INDEX ROWID TABLE OPSHUB.OHMT_ANL_BUCKET Cost: 2 Bytes: 11 Cardinality: 1
    22 INDEX UNIQUE SCAN INDEX (UNIQUE) OPSHUB.SYS_C0040939 Cost: 1 Cardinality: 5
    26 INDEX RANGE SCAN INDEX OPSHUB.FK_BUCKET_TYPE Cost: 0 Cardinality: 6
    28 TABLE ACCESS BY INDEX ROWID TABLE OPSHUB.OHMT_ANL_BUCKET Cost: 1 Bytes: 18 Cardinality: 1
    in both explain plan only difference is
    9 BITMAP CONVERSION TO ROWIDS
    8 BITMAP AND
    5 BITMAP CONVERSION FROM ROWIDS
    but is bitmap degrading performance lot?
    or suggest me what other parameter i can see so 2nd instance gives me better performace.

    I see more differences.
    In plan 1:
    * 16      INDEX RANGE SCAN      idx_bf_creation_date      76           1 (0)     00:00:01
    in Plan 2:
    1 INDEX FULL SCAN (MIN/MAX) INDEX REPORTSDB.idx_bf_creation_date Cost: 3 Bytes: 8 Cardinality: 1
    So this is not about "bitmap" good/bad, it about the access strategy which changed due to differences in data statistics etc. To analyze more, I'd help a LOT if those plans would be formated in a good and same way, use around it to do so.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error when "Copy to Oracle" in Sybase ASE 12.5.3

    I found this thread
    "Copy to Oracle" issue in SQL Developer 3.0
    from google and think I'm having exact same issue.
    Connecting to sybase ASE 12.5.3
    Right-click table, Copy To Oracle..
    Pop up message says "Copy to Oracle finished" and log error:
    Source: o.d.migration.copy.BridgeTableDef
    Message: Issue running BRIDGE command
    I am using JTDS 1.2 and have also tried JTDS 2.1. Oracle SQL Developer 3.0.04
    The sybase table to copy is in the default database of the userid.

    Could you please post a table and some demo data that is failing in your environment - or at least you can also test the table given in the post you are referring to:
    CREATE TABLE sybdb.dbo.fetch (
         f_id           numeric identity(18)      NOT NULL,
         s_id           numeric(18)           NOT NULL,
         added_date      datetime           NOT NULL,
         added_by      varchar(30)           NOT NULL
    INSERT INTO sybdb.dbo.fetch(f_id, s_id, added_date, added_by) VALUES (1080, 2944, '2011-08-05 03:36:10.64', 'User A');
    INSERT INTO sybdb.dbo.fetch(f_id, s_id, added_date, added_by) VALUES (1081, 2944, '2011-08-05 03:36:35.486', 'User B');
    INSERT INTO sybdb.dbo.fetch(f_id, s_id, added_date, added_by) VALUES (1082, 2944, '2011-08-05 03:36:54.24', 'User C');
    Does this work for you or fails also?
    Edited by: kgronau on Dec 7, 2011 8:46 AM
    From which location did you download your JTDS drivers?

  • New To Oracle.. Needs Help:: Conversion from SQL Server to Oracle 11g

    I am new to Oracle 11g and badly need the conversion of SQL Server Functions to Oracle.. Sample Pasted Code not working .. end with error.. pls help
    Create Table TempT (ID1 Varchar (10),
    ID2 Varchar (10)
    CREATE OR REPLACE PACKAGE GLOBALPKG
    AS
    TYPE RCT1 IS REF CURSOR;
    TRANCOUNT INTEGER := 0;
    IDENTITY INTEGER;
    END;
    CREATE OR REPLACE FUNCTION fTempT
    i IN VARCHAR2 DEFAULT NULL
    RETURN GLOBALPKG.RCT1
    IS
    REFCURSOR GLOBALPKG.RCT1;
    BEGIN
    OPEN REFCURSOR FOR
    SELECT TT.*
    FROM TempT TT
    WHERE (fTempT.i = ''
    OR TT.ID1 = fTempT.i)
    RETURN REFCURSOR;
    END;
    CREATE OR REPLACE FUNCTION fTempTF
    i IN VARCHAR2 DEFAULT NULL
    RETURN GLOBALPKG.RCT1
    IS
    REFCURSOR GLOBALPKG.RCT1;
    BEGIN
    OPEN REFCURSOR FOR
    SELECT *
    FROM TABLE(fTempT(i))
    RETURN REFCURSOR;
    END;
    LAST FUNCTION ENDs WITH ERROR
    Error(13,7): PL/SQL: ORA-22905: cannot access rows from a non-nested table item

    2. The major purpose is to get a simplest way to create a parameterized function who can return a table like output. 2nd function has no use instead i was testing the result of First Function like thisIf you just want to select from a select, you should use a view not a function.
    1. which program is more help ful for writing and executing queries bcoz after using Query Analyzer of Microsoft It seems difficult to work on SQL Developer.
    sqlplus? If you are having difficulty learning new tools because of an old one you used, probably best to forget the old one and concentrate on learning the new one because it will be different. This goes for the database itself also.
    2. Can DMLs be used within a Function.Yes, you just can't execute the function in another SQL statement if it modifies data and this is a good thing.
    3. Can temporary tables be used within a function.Unfortunately yes, but they shouldn't be unless you are in a slowest application competition.
    5. Each Function which is a Table Function must be accompanied with Type Definitions?? its a bit longer way of doing the things than SQL ServerThat is why it is better to use views instead, is there any reason you want a select that you can select from inside a function?
    SQL Server for last 9 years thats why i refer this toolThat is not in itself a problem, if you try and do what you did in SQLServer in Oracle, that will be a problem though.

  • Migration from SYBASE IQ to SYBASE ASE 11/12 and then to ORACLE 10G

    Hi ,
    The OWMB tool does not support migration of SYBASE IQ to ORACLE.So there should be some tool to migrate this SYBASE IQ to SYBASE ASE 11/12.And then which we can migrate to ORACLE which the OMWB supports.Does anybody have any idea about such tool(SYBASE IQ to SYBASE ASE 11/12).
    Thanks With Regards,
    Vinoth

    Vinoth,
    That's correct. However Sybase IQ is normally associated with Data Warehouses. Have you investigated the suitability of using Oracle Warehouse builder to assist with such a migration?
    Ispirer supports migration from Sybase IQ 12 ( http://www.ispirer.com/products)
    Donal

  • OMW supports sybase ASE 15 to Oracle 10g migration?

    Hi,
    I want to migrate data from Sybase ASE 15 to Oracle 10g. Can i use OMW for this purpose if not then what is the other way of doing it?
    Kind regards
    Ankit

    No, not the current workbench. We will be bringing out support for Sybase 15 in SQL Developer at the next release.
    You could try bringing the db down to 12 if that was an option and then migrate from that.
    Barry

Maybe you are looking for

  • Report developed in 6i and open and run in 10g, Web Layout is not working

    Hi, Initially reports were developed in Reports 6i now we need to convert into 10g. I just opened the .rdf in Reports10g. Report is successfully running in paper layout and showing the data. But when i try to run the report in Web Layout im getting a

  • Can no longer edit

    I will gladly give an Amazon book token for solution. I bought Con 3 18 months ago but only installed it in last few months. Now that Adobe have launched Con 4 support not offered, so I've lost the paddle and can't even find the creek. Worked fine to

  • Missing external function nivissvc

    Hello, Could you help me to solve this error message? This error occures when I launch my application. The exe and the installer is created with LV and the LV RTE + Vision RTE are also attached to the installer. +++ In God we believe, in Trance we Tr

  • @Radical.Media: music used for this and other "FC Studio-In action" Videos

    Hi there to all of you i'm planning to pass from express to final cut studio, and i sincerely found amazing all the soundtrack musics on the apple website, especially those used for Radical Media "in action" video for Final Cut Studio. Anyone can kin

  • Format bar is tiny. I can hardly see it

    The format bar is so small I have to peer closely at my screen to see it. How can I make it bigger?