How to handle EXTENDED Views  SQL 2000 to Oracle Migration

Hi All,
I am in the process of migrating SQL server 2000 database to Orcle databse. I would like to know how to handle the views created in SQL server with Extended clause.
See below for example for SQL 2000 view.
create view "Order Details Extended" AS
SELECT "Order Details".OrderID, "Order Details".ProductID, Products.ProductName,
     "Order Details".UnitPrice, "Order Details".Quantity, "Order Details".Discount,
     (CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice
FROM Products INNER JOIN "Order Details" ON Products.ProductID = "Order Details".ProductID
Thanks in advance for your reply.
Ramesh

Ramesh
The Workbench has a problem with spaces in identifiers which will be fixed in a later release.
Apart from that large drawback the view should work ok. [The parser handles convert and aliases]
Turloch

Similar Messages

  • How to handle tree view control in business one ui sdk

    Hi,
    Can any guide me on how to handle tree view control in business one ui sdk?
    Thanking in advance.
    With Regards,
    Ram.

    Hi Ram,
    Nowadays there are some trouble with the treeview controls in Windows XP SP2 as you can see here:
    It is said that SAP will publish a treeview control in 2005 SP1.
    Hope helps,
    Ibai Peñ

  • How to Handle dynamic views in mm01 transaction

    Hi ,
           Can any body say me how to handle Dynamic views in MM01 tcode. Since every time new view has to be selected, how can we manage this through our program.
    Regards,

    Hi Nilesh,
    Views will be vary based on the Material Type what u are selectiing , so u have to focus on this settings.
    Regards
    Peram

  • How to connect to a Sql server from Oracle using db link

    Hi All,
    Does anybody have any idea about how to connect to a sql server from oracle database using db link to syncronize the data? I need to pull the data from Sql server table to Oracle tables and relay messages back to the sql server.
    Thank you,
    Praveen.

    we have 2 products - DG4MSQL and DG4ODBC.
    DG4ODBC is for free and requires a 3rd party ODBC driver and it can connect to any 3rd party database as long as you use a suitable ODBC driver
    DG4MSQL is more powerfull as it is designed for MS SQL Server databases and it supports many functions it can directly map to SQL Server equivalents - it can also call remote procedures or participtae in distributed transactions. Please be aware DG4MSQL requires a license - it is not for free.
    Check out Metalink and you'll find notes how to configure both products.
    For a generic overview:
    Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
    And the setup notes:
    DG4ODBC
    Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) :
    Note.466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit RDBMS.HS-3-2 :
    Note.109730.1 How to setup generic connectivity (HSODBC) for 32 bit Windows (Windows NT, Windows 2000, Windows XP, Windows 2003) V817:
    Note.466228.1 How to Setup DG4ODBC on Linux x86 32bit
    DG4MSQL
    Note.466267.1 How to Setup DG4MSQL (Database Gateway for MS SQL Server) on Windows 32bit
    Note.562509.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX)
    Note.437374.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) Release 11 on Linux

  • How do I write this SQL command in Oracle

    Hi all
    I wriote this SQ L statement in Ms SQL Server. How do I write this sql command in Oracle?
    ALTER VIEW dbo.ConsumptionAS SELECT TOP 100 PERCENT ID,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200710' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Oct2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200711' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Nov2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200712' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Dec2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200801' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jan2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200802' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Feb2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200803' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Mar2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200804' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Apr2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200805' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS May2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200806' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jun2008 ,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200807' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jul2008 ,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200808' AND NbrDaysUsed != 0 THEN (QtyUsed/ NbrDaysUsed) * 748.05 ELSE 0 END)) AS Aug2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200809' AND NbrDaysUsed != 0 THEN (QtyUsed NbrDaysUsed) * 748.05 ELSE 0 END)) AS Sep2008
    FROM dbo.MasterConsumption WHERE YEAR_MONTH >= '200710' AND YEAR_MONTH <= '200809' GROUP BY ID ORDER BY ID
    I am very interested in this part:
    SUM(CASE WHEN YEAR_MONTH = '200710' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Oct2007
    thanks
    Edited by: user631364 on Oct 27, 2008 8:25 AM
    Edited by: user631364 on Oct 27, 2008 8:26 AM
    Edited by: user631364 on Oct 27, 2008 8:27 AM

    Thank you!!
    Now let me aslk the second part of my question.
    This sql command:
    ALTER VIEW dbo.ConsumptionAS SELECT TOP 100 PERCENT ID,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200710' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Oct2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200711' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Nov2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200712' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Dec2007,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200801' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jan2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200802' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Feb2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200803' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Mar2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200804' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Apr2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200805' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS May2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200806' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jun2008 ,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200807' AND NbrDaysUsed != 0 THEN (QtyUsed/ Days_Usage) * 748.05 ELSE 0 END)) AS Jul2008 ,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200808' AND NbrDaysUsed != 0 THEN (QtyUsed/ NbrDaysUsed) * 748.05 ELSE 0 END)) AS Aug2008,
    CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = '200809' AND NbrDaysUsed != 0 THEN (QtyUsed NbrDaysUsed) * 748.05 ELSE 0 END)) AS Sep2008
    FROM dbo.MasterConsumption WHERE YEAR_MONTH >= '200710' AND YEAR_MONTH <= '200809' GROUP BY ID ORDER BY ID
    was created with this query in SQL Server and then I saved it in a store procedure, that I scheduled to run montlhy
    SET ANSI_NULLS ON
    DECLARE @SQLString NVARCHAR(4000)
    /* Build the SQL string once.*/
    SET @SQLString = 'ALTER VIEW dbo.Consumption AS SELECT TOP 100 PERCENT ID, CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = ' +
    "'" + dbo.CONLastMonth_fn(getdate(), month(getdate()) - 12) +
    "'" +
    ' AND NbrDaysUsed != 0 THEN (QtyUsed/ NbrDaysUsed) * 748.05 ELSE 0 END)) AS ' +
    dbo.CONMonthInEnglish(getdate(), month(getdate()) - 12) +
    … (GOES FROM current month -12 to current month -1)
    , CONVERT(decimal(10, 2), SUM(CASE WHEN YEAR_MONTH = ' +
    "'" + dbo.CONLastMonth_fn(getdate(), month(getdate()) - 1) +"'" +
    ' AND NbrDaysUsed != 0 THEN (QtyUsed/ NbrDaysUsed) * 748.05 ELSE 0 END)) AS ' +
    dbo.CONMonthInEnglish(getdate(), month(getdate()) - 1) +
    ' FROM dbo.MasterConsumption WHERE YEAR_MONTH >= ' +
    "'" + dbo.CONLastMonth_fn (getdate(), month(getdate())-12 ) +"'" +
    ' AND YEAR_MONTH <= ' +
    "'" + dbo.CONLastMonth_fn (getdate(), month(getdate())-1 ) +"'" +
    ' GROUP BY ID ORDER BY ID '
    EXEC sp_executesql @SQLString
    Is that something that can be done in Oracle in the same way?
    Do you use another approach?
    please advice
    Edited by: user631364 on Oct 27, 2008 10:19 AM
    Edited by: user631364 on Oct 27, 2008 10:21 AM
    Edited by: user631364 on Oct 27, 2008 10:21 AM
    Edited by: user631364 on Oct 27, 2008 10:22 AM
    Edited by: user631364 on Oct 27, 2008 10:23 AM
    Edited by: user631364 on Oct 27, 2008 10:23 AM
    Edited by: user631364 on Oct 27, 2008 10:24 AM

  • How to handle national character set datatypes in oracle?

    Hi
    Can anyone tell me how to handle national character set datatypes in oracle?
    Thanks in advance

    And for data manipulation, append "N" the literal values being used in the command.
    The "N" indicates that the string is to be treated as Unicode Text.
    For Example: insert into TableName (ColumnName) values (N'ValueToBeInserted');

  • How to connect jbuilder and sql 2000

    i faced a problem of connecting sql 2000 and jbuilder 6...........thanks for the help

    What was wrong with the advice you got here?
    http://forum.java.sun.com/thread.jsp?thread=479209&forum=48&message=2229465
    You asked this question two weeks ago. Have you done nothing in all that time?
    You don't need JBuilder to develop Java. A newbie would be better off just using a text editor and compiling and running on the command line. JBuilder is just one more thing you don't understand.
    Have you ever done JDBC before? If not, read this tutorial:
    http://java.sun.com/docs/books/tutorial/jdbc/
    You deserve to flunk that course if all you can manage in two weeks is to ask the same lame question again. - MOD

  • SQL 2000 to Oracle 8i Migration

    Does anyone have any idea about migrating MS SQL 2000 stored procedures to Oracle8i? What kind of conversion does it do? What are the restrictions? Can anyone throw some light as to where I can get the documentation etc?
    Alternatively, MS SQL 7.0 to Oracle8i stored procedures conversion documentation will also be helpful?
    Are there any issues with this conversion product?
    Thanks
    Rajib Ghosh
    Oracle DBA

    hi Kevin,
    For the benefit of some other people I would just like to complete the thread. We have exchanged some e-mails already. The following approach may help some other people.
    We hope to start work on a SQL Server 2000 plugin towards the end of the claendar year and it should only take us 2 months to complete at most. At present we are scoping this effort out.
    We may actually start development earlier.
    One alternative that may work for some people is to downgrade their SS2000 schema to SS7.0, migrate that using the workbench. Then generate the BCP and SQL Loader scripts to migrate the data from the SS2000 database.
    However, if you have taken advantage of SS2000 specific functions then the Workbench may not be able to handle these specific features.
    John Masterson

  • How to handle ' " '(double quotes) in .csv file during migration

    I am facing problem in migrating data from sql server 2000 into oracle via .csv file using sql loader.
    1>How should i migrate the string which contains ' " ' (double quotes) characters,
    as i am enclosing the string in ' " ' in .ctl file (enclosed by ' " ').
    is there any syntax in the control file which can migrate the ' " '(double quotes) as it is as the data in the files is 50000 records .?
    Thank you..

    Yes this is correct.
    but problem will occur when e.g check the foll. string.
    (1001,And I quote "This, will work")
    Here it is a comm(,) in b/w "This and will".
    due to this sqlldr interpret it as end of field. and throws an error.
    I had gone through expert one on one oracle, what it maintioned as,
    put an extra double quotes( " ) like " " to enclosed the double quoted string.
    This works fine. For small data it can be done manually.
    But for large data what condition can be put in the ctl file to achieve this?
    or is there any other way to achieve this?
    Thank you.

  • Convert MS SQL 2000 to Oracle 9i

    Hi,
    I am a newbie in Oracle, I need to convert my current MS SQL 2000 db to Oracle 9i. My current db has about 200 tables with no stored procedures. So I need to convert the db design and data.
    I read from this forum, some suggested to use Oracle Migration Workbench, some suggested Enterprise Manager Console with the Load Wizard.
    How can I do the migration and where can I download the migration tools if any?
    Regards,
    Jenty

    DTS is also buggy which is why SQL Server 2005 has a complete rewrite of the feature.
    Nevertheless for straight data dumps Jim is correct in that DTS should work.
    For getting the DDL you might consider using Query Analyzer to just dump all the DDL into a file and then using C or a script language to extract and convert the SQL into Oracle DDL. If you are a good script (maybe Perl) coder this would be just as quick as setting up and using the conversion tool.
    Once you have the tables defined to Oracle you can use a little pl/sql to generate the sqlldr control cards to pull in the DTS extracted data.
    Or you can use the ability of SQL Server to access Oracle by define a remote db and insert all the data accross. You will need to install an Oracle client on the SQL Server box to do this.
    You have plently of options. Look them all over and go with the one that best matches your available skill set.
    HTH -- Mark D Powell --

  • How to look at the SQL trace in Oracle

    Hi,
    How do we look for the SQL trace in Oracle?
    With SQL trace I mean all the SQL statements being executed in Oracle database ( including select ).
    Thanks........

    Thanks for a quick reply nbellam. I wonder if there is a way to find out the date and time when the sql was executed?

  • SQL 2000 to Oracle 8i migration...Urgent

    Can anyone help me in converting SQL 2000 database to Oracle 8i version(8.1.7).
    I have installed OMWB 9.2 on a windows 2000 machine, but it failed to convert even after many tries. It creates the SQL model perfectly with errors but while converting to Oracle model , it creates no. of errors and also it doesnt convert the oracle model to oracle database perfectly. After migration i do not see migration taken place on the oracle sie.
    If someone is ready to help me, let me send you the SQL 2000 database which you please convert it to oracle and send it to me as scripts. Then i will do the manual conversion wherever required and use it.
    Many thanks in advance,
    Please help me at the earliest...
    Thiru

    Sorry please. discard the above message...
    Turloch,
    I have tried that too but cannot see any table & stored procedure creation scripts. Dont know what i am doing wrong but started migrating it manually. If any one can help in generating the scripts for me, it will be of great help. Anyway, i'm going to disturb this forumn a lot in migrating my database to oracle!!!
    Cheers
    Thiru

  • MS SQL 2000 to Oracle 9R2

    Hi all!
    I'm try to connect from Oracle to MS SQL 2000 (all in WIN NT4)
    but get
    ORA-28508: invalid value OSTRA-KIEV.OFFICE for Heterogeneous Services initialization parameter HS_DB_DOMAIN
    My config files:
    listener.ora:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Yazenok)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = D:\Oracle)
    (SID_NAME = zmey)
    (SID_DESC =
    (PROGRAM = tg4msql)
    (SID_NAME = tg4msql)
    (ORACLE_HOME = d:\oracle)
    tnsnames.ora:
    ZMEY.OSTRA-KIEV.OFFICE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Yazenok)(PORT = 1521))
    (CONNECT_DATA =
    (SID = zmey)
    (GLOBAL_NAME = ZMEY)
    TG4MSQL.OSTRA-KIEV.OFFICE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Yazenok)(PORT = 1521))
    (CONNECT_DATA =
    (SID = tg4msql)
    (GLOBAL_NAME = tg4msql)
    (HS = OK)
    INSUR.OSTRA-KIEV.OFFICE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = solaris)(PORT = 1521))
    (CONNECT_DATA =
    (SID = INSUR)
    (SERVER = SHARED)
    (GLOBAL_NAME = insur)
    inittg4msql.ora:
    HS_FDS_CONNECT_INFO="SERVER=ZMEY;DATABASE=insurance"
    HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_RECOVERY_ACCOUNT=insur
    HS_FDS_RECOVERY_PWD=insur
    HS_DB_NAME=TG4MSQL
    HS_DB_DOMAIN="OSTRA-KIEV.OFFICE"
    Could anybody tell me what I'm doing wrong on this?
    Thanks.

    DTS is also buggy which is why SQL Server 2005 has a complete rewrite of the feature.
    Nevertheless for straight data dumps Jim is correct in that DTS should work.
    For getting the DDL you might consider using Query Analyzer to just dump all the DDL into a file and then using C or a script language to extract and convert the SQL into Oracle DDL. If you are a good script (maybe Perl) coder this would be just as quick as setting up and using the conversion tool.
    Once you have the tables defined to Oracle you can use a little pl/sql to generate the sqlldr control cards to pull in the DTS extracted data.
    Or you can use the ability of SQL Server to access Oracle by define a remote db and insert all the data accross. You will need to install an Oracle client on the SQL Server box to do this.
    You have plently of options. Look them all over and go with the one that best matches your available skill set.
    HTH -- Mark D Powell --

  • M$ SQL 2000 to Oracle 8i

    Does anyone know if there is a beta of the M$ SQL server 2000 Plugin for Migration Workbench 1.3.1.0.0 just have a lot of structure to migrate very little data or a work around to the m$ SQL Server 7.0 plugin to quit whining about only works with 7 any sugestions would be greatly aprieated
    Thanks

    I don't know offhand what FREETEXT or CONTAINS do functionally but it looks as though you have to write emulation functions for these SQLServer specific calls. The emulation functions can mimic the functionality of their SQLServer counterparts i.e.
    CREATE OR REPLACE FUNCTION FREETEXT(addy1 IN VARCHAR, addy2 IN VARCHAR)
    RETURN VARCHAR
    AS
    BEGIN
    /* You write PL/SQL code that mimics the SQLServer functionality */
    END

  • How to import data from SQL server to Oracle?

    Dear Sir/Madam,
    I want to move database data from SQL Server to Oracle, but don't how to do it, will you please help me do it?

    Oracle Migration Workbench is your best bet:
    http://www.oracle.com/technology/tech/migration/workbench/index.html
    Cheers, OTN

Maybe you are looking for

  • NoFilter vs Previous Year

    Hi All, I am new to BO/WEBI and I am facing an issue with a simple cost center report. My plan is to build a report with following structure Cost element │ Act. Month │ Plan Month │ Budget Full Year Current │ Budget Full Year Previous Year │ and I am

  • 5th gen iPod not playing mpeg4 videos

    I have a few mpeg4 videos that I wanted to add to my iPod. They play in iTunes and iTunes recognizes them as the correct format for my iPod. So, I connect my iPod and the videos uploaded themselves with the auto-update. After the update, I grabbed th

  • Help!  Best data recovery software?

    Help! Accidentally put some important photos in the Trash Can, and emptied it. Best data recovery program = ? Thanks!

  • Is it possible to have a domain/user in BPEL PM with read access only?

    Hi, We deploy, undeploy, purge process and instances using the BPEL PM through the domain credentials. Is it possible to create a domain/profile/user in BPEL PM, through which we can only view the processes and the instances deployed in BPEL PM? This

  • Why can't I open items in iDVD sub menu & Open Existing project lists?

    Recently I installed *Jam Pack-Music of the World*. Since then, my iMac experienced one Kernal Panic while I was using iMovie. Later I tried to burn the movie I had been working on, iDVD got stuck at audio encoding and then quit unexpectedly a while