Question from To_float in oracle

Below the conversion is used in Informatica code to form source responsible for the GET to target oracle table data.
With the help of the ETL tool

Decode (TO_FLOAT (substr (WBS_Element, 5, 12)), TO_FLOAT('0'), null, TO_FLOAT (substr (WBS_Element, 5, 12)))

But when I tried to run in oralce I get the error message

Select decode (to_float (substr (WBS_Element, 5, 11)), TO_float('0'), null, TO_float (substr (WBS_Element, 5, 11)))
the bis. WBS

ORA-00904: invalid identifier To_FLOAT


Thnaks in advance
Deb

Just where in the FUNCTIONS in Oracle® database SQL language Referencesection, describes to_float() function?

You know, you can always stop second-guessing and making up your own keywords of the language and the functions and simply refer to the language reference guide instead...

Tags: Database

Similar Questions

  • Question from Batchloader in oracle webcenter content

    Hi Experts,

    I am using Oracle webcenter content 11.1.1.7.0. To configure a JDBC driver for stand-alone applications, I ran

    DomainHome

    / UCM/CS/bin/SystemProperties and entered the details as follows

    database driver classpath: /Integration/d02/app/oramdev/product/11.2.0/dbhome_1/jdbc/lib/ojdbc6.jar

    JDBC driver name: oracle.jdbc.OracleDriver

    JDBC connection string: jdbc:oracle:thin:@server2.yantro.com:1521/orcl.yantro.com

    JDBC user name: DEV_OCS
    JDBC user password: password schema

    so I ran. / BatchLoader and it throws the following error.

    oramdev@Server2 bin] $. / BatchLoader

    Component 'DynamicConverter', version
    '2013_01_16 (rev 23669) 11.1.7.6', require
    s a missing feature. The feature
    'ContentAccess' is not installed.

    > componentloader/4 06.21
    main 19:11:19.106! csComponentRequiresMiss
    ingFeatures, DynamicConverter, 2013_01_16 (rev 23669)
    11.1.7.6,! syFeatureNotInstal
    led\, ContentAccess\,-, 0

    > (internal) / 3 19:11:31.953 06.21
    principal! $Unable to start the batch loading
    amplifier.

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.common.Defau
    ltTraceImplementor.appendStackTrace(DefaultTraceImplementor.java:327)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.common.Defau
    ltTraceImplementor.traceDumpException(DefaultTraceImplementor.java:446)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.common.Defau
    ltReportHandler.message(DefaultReportHandler.java:439)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.common.Defau
    ltReportDelegator.message(DefaultReportDelegator.java:140)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.common.Repor
    t.messageInternal(Report.java:172)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.common.Repor
    t.message(Report.Java:154)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.common.Repor
    t.Error(Report.Java:427)

    (internal) / 3 19:11:31.953 06.21
    principal at BatchLoader.main-(Batc
    hLoader.java:104)

    (internal) / 3 19:11:31.953 06.21
    principal at sun.reflect.NativeMet
    hodAccessorImpl.invoke0 (Native Method)

    (internal) / 3 19:11:31.953 06.21
    principal at sun.reflect.NativeMet
    hodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    (internal) / 3 19:11:31.953 06.21
    principal at sun.reflect.Delegatin
    gMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    (internal) / 3 19:11:31.953 06.21
    principal at java.lang.reflect.Met
    Hod.Invoke (Method.Java:597)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.loader.IdcCl
    assLoader.invokeMain(IdcClassLoader.java:352)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.loader.IdcCl
    assLoader.startMain(IdcClassLoader.java:170)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.loader.IdcCl
    assLoader.main(IdcClassLoader.java:140)

    (internal) / 3 19:11:31.953 06.21
    principal caused by: intradoc.data.DataExc
    Reconstructed:! apFailedToInitialize

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.apps.shared.
    AppLauncher.init (AppLauncher.java:252)

    (internal) / 3 19:11:31.953 06.21
    principal at BatchLoader.main-(Batc
    hLoader.java:82)

    (internal) / 3 19:11:31.953 06.21
    Senior... 7 more

    (internal) / 3 19:11:31.953 06.21
    principal caused by: intradoc.common.Servi
    ceException:
    ! csProviderUnableToInitialize, SystemDatabase

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.server.IdcSy
    stemLoader.loadProviders(IdcSystemLoader.java:2371)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.server.IdcSy
    stemLoader.initProviders(IdcSystemLoader.java:2124)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.server.IdcSy
    stemLoader.finishInit(IdcSystemLoader.java:400)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.server.IdcSy
    stemLoader.init(IdcSystemLoader.java:335)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.apps.shared.
    StandAloneApp.initSystem (StandAloneApp.java:277)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.apps.shared.
    StandAloneApp.init (StandAloneApp.java:112)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.apps.shared.
    AppLauncher.init (AppLauncher.java:234)

    (internal) / 3 19:11:31.953 06.21
    Senior... 8 more

    (internal) / 3 19:11:31.953 06.21
    principal caused by: intradoc.data.DataExc
    Reconstructed:
    ! csJdbcUnableToCreateConnection,SystemDatabase,jdbc:oracle:thin:@server2
    .yantro.com:1521/ORCL.yantro.com

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.jdbc.JdbcCon
    nectionUtils.getConnection(JdbcConnectionUtils.java:123)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.jdbc.JdbcWor
    kspace.init(JdbcWorkspace.Java:84)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.provider.Pro
    vider.init(Provider.Java:71)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.server.IdcSy
    stemLoader.loadProviders(IdcSystemLoader.java:2361)

    (internal) / 3 19:11:31.953 06.21
    Senior... 14 more

    (internal) / 3 19:11:31.953 06.21
    principal caused by: java.sql.SQLException
    : ORA-01017: name of user and password invalid.
    connection refused

    (internal) / 3 19:11:31.953 06.21
    main

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CTTIoer.processError (T4CTTIoer.java:445)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CTTIoer.processError (T4CTTIoer.java:389)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CTTIoer.processError (T4CTTIoer.java:382)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CTTIfun.processError (T4CTTIfun.java:600)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CTTIoauthenticate.processError (T4CTTIoauthenticate.java:445)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CTTIfun.receive (T4CTTIfun.java:450)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CTTIfun.doRPC (T4CTTIfun.java:192)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CTTIoauthenticate.doOAUTH (T4CTTIoauthenticate.java:380)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CTTIoauthenticate.doOAUTH (T4CTTIoauthenticate.java:760)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CConnection.logon (T4CConnection.java:401)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.Ph
    ysicalConnection. < init > (PhysicalConnection.java:546)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CConnection. < init > (T4CConnection.java:236)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.T4
    CDriverExtension.getConnection (T4CDriverExtension.java:32)

    (internal) / 3 19:11:31.953 06.21
    principal at oracle.jdbc.driver.Or
    acleDriver.connect(OracleDriver.java:521)

    (internal) / 3 19:11:31.953 06.21
    principal at java.sql.DriverManage
    r.getConnection(DriverManager.java:582)

    (internal) / 3 19:11:31.953 06.21
    principal at java.sql.DriverManage
    r.getConnection(DriverManager.java:154)

    (internal) / 3 19:11:31.953 06.21
    principal at intradoc.jdbc.JdbcCon
    nectionUtils.getConnection(JdbcConnectionUtils.java:107)

    (internal) / 3 19:11:31.953 06.21
    main... more than 17

    and in addition, it shows the following

    lying to start batch charger. Failure of initialize.unable to initialize the system provider "systemdatabase. Could not create connection to database for the "systemdatabase" with the connection string

    'jdbc:oracle:thin:@server2.yantro.com:1521/orcl.yantro.com '. Please ensure that the connection string, the user and password are correct.

    java.sql.SQLException:ORA - 01017:invalid name of user and password. connection refused

    Hello

    ! csProviderUnableToInitialize, SystemDatabase

    To solve it, the steps are:

    1. go to /ucm/cs/bin/SystemProperties applet

    2. go to the tab database, and then select the Oracle Thin driver

    3 leave the classpath field empty

    4. to connect to the db, provide the db details name of host name, port and service

    5. set the UCM schema user id and password and update

    6.

    These sql queries are running 2 on the diagram of the UCM DB:

    update users set dpasswordencoding = "where dname as 'sysadmin ';

    update users set dpassword = "idc" where dname like 'sysadmin ';

    7. then run BatchLoader and check that it works very well.

    Thank you

    Srinath

  • Golden Gate 11 g replicate from MySQL to Oracle

    Golden Gate 11 g for MySQL can read mysql binlog. I have a question, can I use GG11g for MySQL to replicate from MySQL to Oracle?

    Thank and regard

    OK, here's the official word from Oracle on it.

    Oracle GoldenGate now supports MySQL 5.1.15 and later capture and oracle can be a target. Therefore, if you use MySQL 5.1.15 or later, you can indeed use Golden Gate to replicate from MySQL to Oracle when you use GoldenGate 11 g.

  • Question RE: being an Oracle Developer, best practices.

    Dear Oracle gurus:

    If you would be so kind as to entertain a few lame need questions will Jr. Oracle Developer, I would be very happy!

    1. If I understand correctly, I can pretty much Learn SQL and PL/SQL using Oracle 10 g Express without the need to install further configuration of Oracle? SQL Developer and Oracle 10 g Express would be sufficient for learning SQL and PL/SQL?

    2. how the future for an Oracle developer who is well versed in SQL and PL/SQL? Was hoping to specialize in this aspect of Oracle and may continue with the discoverer (I had previously had some experience deploy reports in Discoverer 3/3i). Your opinions?

    3. as an Oracle Developer, am I supposed to know that s/n matter as well? Or stick to the development? The reason why I ask is - I found that if I try to do too much, a whole bunch of nothing does happen. Isn't better to focus on something and do it well?

    4. any ideas or comments about the future of development in Oracle you want to share?

    Thank you for your time! :)

    Igor_ wrote:
    1. If I understand correctly, I can pretty much Learn SQL and PL/SQL using Oracle 10 g Express without the need to install further configuration of Oracle? SQL Developer and Oracle 10 g Express would be sufficient for learning SQL and PL/SQL?

    Oracle 10g Express Edition will give you at least 1 year of learning. If you are really able to SQL and PL/SQL Express, you are longer than many so-called Oracle professionals.

    2. how the future for an Oracle developer who is well versed in SQL and PL/SQL? Was hoping to specialize in this aspect of Oracle and may continue with the discoverer (I had previously had some experience deploy reports in Discoverer 3/3i). Your opinions?

    Unfortunately, I see that SQL and PL/SQL to be lost in the hype Java and .net. More and more developers and applications forget the basics of database.

    Indeed, a much touted merger devleopment demo focuses strongly on tanks (single general-purpose attribute-value lookup Table)

    >

    3. as an Oracle Developer, am I supposed to know that s/n matter as well? Or stick to the development? The reason why I ask is - I found that if I try to do too much, a whole bunch of nothing does happen. Isn't better to focus on something and do it well?

    A good developer knows his tool. A good database developer Oracle SQL doesn't understand.

    A great developer Oracle includes the internal implications of the database, but also a DBA. Both (but rarely) should work closely together.

    For example, a great developer understands that you do not commit in a loop. The 'why' of it is often seen by developers as "something DBA.

    >

    4. any ideas or comments about the future of development in Oracle you want to share?

    I would say a lot of reading is in front of you. I would encourage the following, in the following order:

    Manual chapter, Oracle Concepts 1
    Guide the developer Oracle - foundations, chapters 1 & 2
    one of the books of database Oracle Expert Tom Kyte
    O'Reilly books "SQL Cookbook"
    Books O'Reilly Oracle PL/SQL (co-) written by Steve Feuerstein
    ORacle concepts, the rest
    Dan Morgan Library to http://www.morganslibrary.com
    Developer's Guide - Fundamentals - Oracle the rest
    The Oracle - other as interest falls Developer's Guide

    Oracle guides are available from http://tahiti.oracle.com and most SQL and PL/SQL can be exercised on the free and moderately light (sic) Express Edition.

  • How transform the trailing spaces &amp; AREAS of data from sybase to oracle

    Helllo,

    We are the migration of data from sybase to Oracle using goldengate... Source Sybase with SPACES (single / Multiple) as data to CHAR/VARCHAR that will be migrated to the VARCHAR2 data type in Oracle. I'm having trouble trying to implement under two conditions to transform the data

    1) Remove SPACES during the IPL for CHAR/VARCHAR

    example: Data Source: "TRAILING SPACE.

    Given target expected - remove the spaces of trailinging: "TRAILING SPACE.

    2) If the data with SPACES like a value (single or Multiple) will be loaded as a single SPACE in Oracle.

    example : Source data                                                  :  "          "

    Expected data from target - unique space:

    Map: dbo. Target TEST_TABLE DEV01. Table_test, COLMAP (USEDEFAULTS, CRE_ID = @IF (@STRRTRIM (CRE_ID) = @NULL AND CRE_ID <>@NULL, ' ', @STRRTRIM (CRE_ID)));

    I tried above mapping in the settings file, but it returns error like below, guidance on the highest implementation requirement will be useful.

    ... RIM (CRE_ID) = @NULL AND CRE_ID...

    ^

    Error in the COLMAP clause. Invalid function or argument.

    Under column mapping is worked :-)

    Map: dbo. Target TEST_TABLE DEV01. TABLE_TEST, COLMAP (USEDEFAULTS, CRE_ID = @IF (@STRLEN (@STRTRIM (CRE_ID)) = 0, ' ', @STRRTRIM (CRE_ID)));

  • Migration from MySQL to Oracle SQL does not

    Hello everyone,

    I am new to Oracle SQL, but since our MySQL database is more and get more slowly, I would like to test the performance of Oracle SQL.

    So, I downloaded the current Oracle Linux distro and installed Oracle Database 11 g Express Edition.

    I connected with Oracle SQL Developer and started to migrate the MySQL database by following each step of this tutorial.

    I had to abandon all the privileges of the user migration (otherwise the creation and the deleteion of the migration repository did not) and I have disabled the migration of constraints to make migration work.

    Then I proceeded through all of the steps of the tutorial and ended with a "successful migration.

    The last step of the tutorial, it was to connect to the db migrated (using a combination of username/password generated name), it was not possible.

    What do I already checked?

    • Logged on as user system, I see that there is no new user created for the migrated db
    • Looking at the overview in the migration repository I see 3 phases, not knowing if the third displays an error or if it is not necessary at all (I got 58 tables in the db of the source)
      • Capture of 58/58
      • Convert 58/58
      • Compile 0/58

    From here, I don't know where to look for additional errors.

    I still can't use the migrated db and so I can't go forward with my tests.

    I missed something?

    I would appreciate your help.

    Astaldo

    Astaldo salvation,

    First, you must use SQL Developer 4.0.2 If you aren't already. It is available for free on OTN

    http://www.Oracle.com/technetwork/developer-tools/SQL-Developer/downloads/index-098778.html

    There are two ways to convert tables from MySQL to Oracle.

    1) copy to Oracle

    (2) migration to Oracle.

    Copy to Oracle is the simplest method. It does not imply the creation of a repository of migration.  But it only migrates data without constraints or default values or indexes and tables. The set of data to move should be reasonably low as it is moved on JDBC.

    It may suit your purpose to try to Oracle.

    http://dermotoneill.blogspot.co.UK/2010/11/copy-to-Oracle.html

    Migrate Oracle requires the implementation of a migration repository. But he migrate the default settings, constraints, and indexes and can also provide scripts offline data move that can manage the circulation of large data sets.

    Here is a small script to create a new MIGRATIONREPO user, and grant the correct privileges.

    CREATE USER MIGRATIONREPO IDENTIFIED BY oracle.

    ALTER USER MIGRATIONREPO QUOTA UNLIMITED ON USERS;

    GRANT CONNECT, RESOURCE, CREATE VIEW, CREATE MATERIALIZED VIEW to MIGRATIONREPO;

    Then using SQL Developer, create a connection to MIGRATIONREPO, right-click on the connection and choose "associate the Migration repository.

    I hope you have success best creation of migration with the privileges of theses repository.

    Migration Wizard step 8: target database

    Choose Offline Mode.

    This will present you with a build script that you can inspect before the race.

    The build script must be run using the SQL Developer worksheet and choose free user sufficiently privileged in Oracle generally SYSTEM.

    Note that if you would rather work with the repository you must currently you can browse your browser of Migration.

    Access converted database objects, right-click and select "generate the target".

    This will again open the Migration Wizard in step 8. Allowing you to choose Offline Mode so that you can review the build script.

    Hope this helps,

    Kind regards

    Dermot.

    SQL development team.

  • Questions from the media on the report columns

    Hello

    I'm experimenting with questions from the media on the APEX components such as the columns on the report.

    I have an example that works, but I wonder if it's the best way to go about it.

    APEX media query example

    I applied the following CSS

    @media (orientation:portrait) {
      .landscape_only {display:none;}
    }
    @media (orientation:landscape) {
      .portrait_only {display:none;}
    }
    

    For components such as regions, buttons etc - I can apply "CSS Classes" attribute class to the component level.

    for example: I have applied the .portrait_only in the area of 'Code' in my example

    but for the columns in a report, I had to apply this jQuery on the page loading.

    $('th#HIREDATE, td[headers=HIREDATE]').addClass("landscape_only");
    

    If I applied to the class in the detail of the column that the data has been hidden when Guide to portrait - not the entire column.

    Are there more effective methods of enforcement of the class to the column?

    Reading articles like this lead me to think that way, but I don't know if APEX could be other solutions.

    5 tips for better jQuery selectors - SitePoint

    It becomes a little pain if I wanted to list a number of columns.

    I look forward to jQuery gurus ;-)

    Scott

    Rather than specify the classes at the level of the components and using jQuery when running, why not simply specify the items directly in the stylesheet?

    @media (orientation:portrait) {
      #P2_BUTTON2,
      th#HIREDATE, td[headers=HIREDATE]  {display: none;}
    }
    @media (orientation:landscape) {
      #P2_BUTTON1 {display: none;}
    }
    

    This seems to be a more effective approach that all orientation-based rules are easily visible and easy to manage in one place, rather than be dispersed through the definitions component and dynamic action.

  • How to import the selected tables from MySQL to Oracle

    Hello world:

    How can I import tables from MySQL to Oracle? I have more than 180 tables in my DB (MySQL), but I copy only 12 of them to ORACLE... rigth now I do it manually, using SQL Developer (rigth clicking on the picture icon and copy to Oracle) but now I need to do this automatically every 4 hours...

    I read on the dblink option, but I don't know if this is the best for this case...

    I appreciate all help.

    Best regards
    Jack

    Hi Jack,

    I think that with a db-link you can define an automated task (PL/SQL + programmer).
    We use a db-link to Oracle's RDBMS to MySQL. So we have no experience.
    We have created the db-link like http://www.pythian.com/news/1554/how-to-access-mysql-from-oracle-with-odbc-and-sql/

    Heike cordially

  • Three Questions from beginner to Captivate 3

    Adobe Captivate 3.

    I have three questions from beginner to Adobe Captivate 3.

    1. I noticed that CP3 only creates SWF files.  Why not offer the possibility to create an FLV file in the final product?  What is the difference between a SWF file and a FLV?

    2. I want my finished product for a single slide with a picture in the background and some areas of reversal.  It seems that no matter what I do, the blade is not fixed, but faints and disappears after the default time of 3.3 seconds.  How can I achieve making the slide remains in place, not disappear, and behave as I want?

    3. I want to do a slide that has a video autoplay Flash on it (this part I know how to do), but I want the slide to move to another slide specified when the video ends, without user action.  How can I do?

    Thanks to anyone who can help me on these issues.

    Hello

    Doug chaplain wrote:

    Adobe Captivate 3.

    I have three questions from beginner to Adobe Captivate 3.

    1. I noticed that CP3 only creates SWF files.  Why not offer the possibility to create an FLV file in the final product?  What is the difference between a SWF file and a FLV?

    CP3 does not FLV because it was not part of the specification for CP3. I don't know why it is like that. Maybe the Captivate development team knows for sure. In any case, Captivate 5 was recently released. If the point is little questionable, right?

    Regarding the second part of this question, SWF can have interactivity such as bearings or clickable areas or buttons that perform different actions. FLV is usually just a video, just like a DVD movie that you watch passively, and you do not participate.

    2. I want my finished product for a single slide with a picture in the background and some areas of reversal.  It seems that no matter what I do, the blade is not fixed, but faints and disappears after the default time of 3.3 seconds.  How can I achieve making the slide remains in place, not disappear, and behave as I want.

    You can get there. Just insert a click box and time it so it suspends the slide at the right time.

    3. I want to do a slide that has a video autoplay Flash on it (this part I know how to do), but I want the slide to move to another slide specified when the video ends, without user action.  How can I do?

    So now you change course on us? You said to question 2 you want the finished product is a single slide! This is perhaps another project, you're talking about.

    If you examine the properties of the slide, you will discover a labeled area of Navigation. Using this box, you can choose to navigate to another slide when it finishes playing.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcererStone blog

    Captivate eBooks

  • Script Insert statement to extract data from Table in Oracle 7i

    Hi all, I have an old Oracle legacy system that works for more than 15 years. Every now and then, we need to extract data from this table @ ORacle 7i to import to Oracle 10 G.

    My thoughts are to create a script to Insert statements in oracle 7 and that, to be deployed to Oracle 10 G.

    I found cela scripts in Google and don't know exactly how it works. No explanation on these scripts, would be greatly appreciated. I find that this format can help to produce a set of insert statements in this table to the last table to 10G.

    < pre >
    -Step 1: create this procedure:
    create or replace function ExtractData (v_table_name varchar2) return varchar2 as
    Boolean b_found: = false;
    v_tempa varchar2 (8000);
    v_tempb varchar2 (8000);
    v_tempc VARCHAR2 (255);
    Start
    for tab_rec in (select table_name from user_tables where table_name = upper (v_table_name))
    loop
    b_found: = true;
    v_tempa: =' select ' insert into ' | tab_rec.table_name |' (';
    for col_rec in (select * from user_tab_columns)
    where
    table_name = tab_rec.table_name
    order by
    column_id)
    loop
    If col_rec.column_id = 1 then
    v_tempa: = v_tempa | " ' || Chr (10) | " ' ;
    on the other
    v_tempa: = v_tempa |', ". Chr (10) | " ' ;
    v_tempb: = v_tempb |', ". Chr (10) | " ' ;
    end if;
    v_tempa: = v_tempa | col_rec.column_name;
    If instr(col_rec.data_type,'CHAR') > 0 then
    v_tempc: = "' |' | col_rec.column_name |'| " ' ;
    elsif instr (col_rec.data_type, 'DATE') > 0 then
    v_tempc: = "' to_date ("'| to_char('|| col_rec.column_name||',''mm/DD/YYYY HH24 '') | ") (', "' dd/mm/yyyy hh24"') "';
    on the other
    v_tempc: = col_rec.column_name;
    end if;
    v_tempb: = v_tempb | " ' || Decode('|| col_rec.column_name||',''Null'','||v_tempc||') | " ' ;
    end loop;
    v_tempa: = v_tempa |') values ('| v_tempb |'); "from ' |" tab_rec.table_name | « ; » ;
    end loop;
    If not b_found then
    v_tempa: ='-Table ' | v_table_name | 'not found ';
    on the other
    v_tempa: = v_tempa | Chr (10) | "select"-commit; "double;';
    end if;
    Return v_tempa;
    end;
    /
    display errors

    -STEP 2: run the following code to extract the data.
    Go head
    set pages 0
    game of stripes on
    fixed lines 2000
    the feeding off value
    trigger the echo
    var retline varchar2 (4000)
    coil c:\t1.sql
    Select 'set echo off' from dual;
    Select 'spool c:\recreatedata.sql' from dual;
    Select ' select "-these data was extracted on" | TO_CHAR (sysdate, "mm/dd/yyyy hh24" ") double;' double.

    -The following two lines as repeat as many times as the tables that you want to extract
    exec: retline: = ExtractData ('dept');
    print: retline;

    exec: retline: = ExtractData ('emp');
    print: retline;

    Select 'off spool' from dual;
    spool off
    @c:\t1

    -Step 3: run the updated c:\recreatedata.sql waiting for output to recreate the data.

    Source: http://www.idevelopment.info/data/Oracle/DBA_tips/PL_SQL/PLSQL_5.shtml




    < / pre >

    Hello

    Well what this script do.
    You will pass a table name as input to the function that will return varchar2 (string - insert statement). It will generate 2 t1.sql of sql script that contains the output sequence.

    Will use the first passed the user_tables scipt to check if the input table name exists and if there is the will reterive user_table_columns column names and generate the following sql script.
    Now, this t1.sql will run to generate a final sript formally orders insert that will run you on the target schema (make sure that the table exists).

    * #t1.sql*

    set echo off
    spool recreatedata.sql
    select '-- This data was extracted on '||to_char(sysdate,'mm/dd/yyyy hh24:mi') from dual;
    select 'insert into MY_OBJECT1 ('||chr(10)||'OWNER,'||chr(10)||'TOTAL) values ('||decode(OWNER,Null,'Null',''''||OWNER||'''')||','||chr(10)||''||decode(TOTAL,Null,'Null',TOTAL)||');' from MY_OBJECT1;
    select '-- commit;' from dual;
    spool off
    

    Then @t1.sql runs, and the general insert for the infeed table table.

    -- This data was extracted on 03/09/2009 23:39
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('MDSYS', 92800);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('TSMSYS', 256);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('DMSYS', 15104);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('TESTME', 128);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('PUBLIC', 2571392);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('OUTLN', 768);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('CTXSYS', 21888);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('OLAPSYS', 78336);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('KLONDIKE', 2432);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('SYSTEM', 51328);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('EXFSYS', 21504);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('DBSNMP', 4096);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('ORDSYS', 216192);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('SYSMAN', 111744);
    
    -- commit;
    

    Hope this helps
    Concerning

  • isn't 90% more questions from the actual training?

    Several years ago I had an instructor (Chinese leader) who was in charge of the certification test,

    and she said that most of the test questions is from dishes of course.

    It allows to actually take the course.

    Many Oracle certification tests (not all) have one or more Oracle University courses that match very closely the subjects that will be tested.  In these cases, the course of the ORGANIZATIONAL unit is a great way to prepare for the exam.  There is certainly no fixed percentage (90% or other) of the exam questions which can respond by using the material presented in the course.

    For tests where these exam-course correlations exist, I think that there is at least some degree of direct liaison between the two.  OR developing tutorials and reviews - people doing this development perhaps in some cases.  Even if developers review certainly not access o material of course and probably vice versa.

  • Question about EM and Oracle Net Manager

    Good afternoon

    It is said in the Net Services Administrator's Guide:
    To start Oracle Net Manager from the Oracle Enterprise Manager console, select
    Service Management from the Tools menu, and then select Oracle Net Manager.
    Nowhere I see a 'Tools' menu, or an option 'Service Management' in EM.

    Question: Y at - it a 'Tools' menu that I missed? If Yes, where? If there is no menu 'Tools', is it possible to start Oracle Net Manager of EM, as shown in the Net Services Administrator's Guide?

    Thank you for your help,

    John.

    PS: possibly useful additional info:
    4NT8>emctl status dbconsole
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
    https://Orahost.john.local:1158/em/console/aboutApplication
    Oracle Enterprise Manager 11g is running.
    ------------------------------------------------------------------
    Logs are generated in directory E:\Oracle\product\11.2.0\dbhome_1/Orahost.john.local_dbca/sysman/log
    BANNER
    --------------------------------------------------------------------------------
    
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

    As far as I KNOW, "Oracle Enterprise Manager console" refers to the java console for OEM 9i. A Tools menu there. Are you sure you read your documents version db?

  • Question from beginner on the fusion of the Recrords in the Table

    This question is about question 10-b of merger on page 3-41, it says:
    (page 3-41 "Oracle Database 10g SQL Fund. II Vol.1")

    Merge the data into the EMP_DATA table that is created in the lab last in the data in the table emp_hist. assume
    EMP_DATA external table data corresponds to the EMP_HIST of table, update the email column
    table EMP_HIST to match the row in the EMP_DATA table. If a row in the EMP_DATA table is not
    match, to be inserted in the tables of EMP_HIST lines are considered as corresponding whenever his first and
    family name are the same.

    For me, this issue is built wrong. First of all in the last lab we have not been asked to create EMP_DATA. Secondly, EMP_DATA is empty.
    Thirdly, this question asks us to merge into the table EMP_HIST while EMP_DATA is empty.

    Table EMP_HIST currently copied data from the employees table. Structure EMP_HIST:

    FIRST NAME VARCHAR2 (20)
    LAST_NAME NOT NULL VARCHAR2 (25)
    EMAIL NOT NULL VARCHAR2 (45)

    EMP_DATA table is empty. I created it as follows:

    create or replace directory emp_dir
    like 'F:\emp_dir ';

    drop table emp_data;

    CREATE TABLE emp_data
    (first name VARCHAR2 (20))
    , last_name VARCHAR2 (20)
    , email VARCHAR2 (30)
    )
    EXTERNAL ORGANIZATION
    (
    TYPE oracle_loader
    Emp_dir default DIRECTORY
    ACCESS SETTINGS
    (
    RECORDS DELIMITED BY NEWLINE CHARACTERSET US7ASCII
    NOBADFILE
    NOLOGFILE
    FIELDS
    (first name POSITION (01:20) TANK)
    , last_name POSITION (22:41) TANK
    CHAR POSITION (43:72) by email)
    )
    LOCATION ('emp.dat'));

    Back to our question, I've done the merger as follows:

    merge into e emp_hist
    with the help of emp_data d
    on (e.first_name = d.first_name)
    When matched then
    game update
    Select = d.last_name,
    e.email = d.email
    When not matched then
    Insert values (d.first_name, d.last_name, d.email);

    I get this error:

    Error report:
    SQL error: ORA-29913: error in executing ODCIEXTTABLEOPEN legend
    ORA-29400: data cartridge error
    KUP-04040: file emp.dat in EMP_DIR not found
    ORA-06512: at "SYS." ORACLE_LOADER', line 19
    29913 00000 - "error in the execution of %s legend".
    * Cause: The execution of the specified legend caused an error.
    * Action: Examine the error messages take appropriate measures.

    On the other hand, I said I'm going to try this:

    merge into emp_data d
    using e emp_hist
    on (d.first_name = e.first_name)
    When matched then
    game update
    d.last_name = select,
    d.email = e.email
    When not matched then
    Insert values (e.first_name, select, e.email);

    I get this error because the external table's final after its creation (no update, insert, delete authorized) as far as I know:

    Error report:
    SQL error: ORA-30657: operation not supported on external organized table
    30657.0000 - "operation not supported on external-organized table".
    * Cause: User attempted on the operation on an external table which is
    not supported.
    * Action: Don't do that!

    **********************************

    I don't know what to do. I did my best, please help.

    What happens if I want to import large data set in the external table?

    Hmm, external table is just a definition on how you want to watch a file as a table in the database. Think of it as a tool to import data.

    1. first of all, have a ready file (with data).

    2. create an external table using the format of the file.

    3. now you should be able to see the data when you do this. Select * from my_external_table.

    4. now, create an ordinary table where you want the data to insert permanently.

    5 insert into permanent_table select * from my_external_table.

    I hope this helps.

  • 8620 printer - fax receiving to questions from a private number

    Help a friend to me.  Recently bought a new JO Pro 8620 AiO

    He had Comcast - internet and phone 2 lines - 1 line is dedicated to... fax number when it receives a fax from a private number (it takes care of most of the schools are set up as private numbers)-he must manually accept the fax on the screen of the printer.  This parameter is missing on the fax configuration or if he chose so that it has more to do this... and that one receives fax anything?

    Hi GBrun,

    The answer you are looking for is "set auto answer."

    The process is mentioned on page 77 of the manual which can be found at http://h10032.www1.hp.com/ctg/Manual/c04204791.pdf

    You can also set the number of rings before answer (page 78).

    1 small question - is actually two different lines of your friend's phone line? or just a line with two phone numbers assigned? If you take a phone while the other is in use and you hear the converstion, it is a line with two phone numbers. If you do not, then it's two separate lines.

    If it's 1 line with two phone numbers, then you will also need to put a special (page 78 again) ringtone - in this way, the machine can recognize what line call and be able to pick up in time.

    Good luck!

    _______________

    I do NOT work for HP

  • Question from newbie GPIB on multiple devices

    Hello, I'll work on the reproduction of a test bench that communicates through GPIB. I've never worked with GPIB and I'm looking for a list of hardware to buy to reproduce this system and have a question. I'm having 2 GPIB devices, one on the address 9 address the other 22. One device is a voltmeter of HP and the other is a HP (3488 (A) switch unit. The old test bench has 2 GPIB cards for that but my question is should I really 2 GPIB cards to communicate with these 2 devices? From what I've read up to 15 devices can be connected on the same port, GPIB. Is how software should be written is different because of the Garland of devices?

    Hello

    GPIB addresses up to 15 devices and you don't need two gpib cards.

    Addresses of software always using an address, so the only thing you need to take care of is to assign different addresses to instruments and to ensure that all calls are sequential, not parallel because it's just a bus.

Maybe you are looking for