How to make code standardization in oracle 10 in sql/pl-sql

if any body helps to handle how to make code standaridazation in oracle 10g in sql/pl-sql.

refer tis link and get download..
http://www.itap.purdue.edu/ea/data/standards/plsql.cfm

Similar Messages

  • How to make picture button in oracle forms?

    can any one tell me how to make a picture button in oracle form builder?
    please help?

    Hi,
    Only a icon can be pasted on the push button. We can not user jpg,,jpeg or gif for the picture only ico file can be used.
    go to properyt pallet,
    make iconic as yes
    give the path in icon filename --- C:\Program Files\Winamp\eMusic\eMusicClient
    where eMusicClient is -- icon file name without extension, dont use " " in path
    bye

  • How can I code this in Oracle Forms?

    I have a master-detail form. In the detail block, I have several records. Here is my name table.
    ID Name_Type Name
    1 old Mike
    2 Current John
    3 old Peter
    4 old Andrew
    I would like to create a button trigger which shall perform the following:
    1) insert a record into database with a copy of current value. In the above case it will insert create a record for John as name_type = 'OLD'. So we have total of 5 records. Commit the transaction.
    2) Scroll through my detail records (5) and go to one specific record and erase the values from it. In the above case, it should find John's record with name_type = 'Current' and erase John from it.
    How can I accomplish this in Oracle forms using a button-pressed trigger?

    Hi,
    Simple, using current values you can create new id , 'old' and name so oracle will create record, now refresh block, next using next_record in loop you can find record,erase one and refresh block.
    Adinath Kamode

  • How to make code immune to changes in (external) database names?

    I wonder if there is a way to make code in one database immune to changes in names of other databases that the code uses. Essentially, what I'm after is something like an alias but not for a specific object in a database but rather for a whole database,
    be it on the same server or any other place. Is something like this possible? I wouldn't like to use Linked Servers, bear in mind please... Thanks for any replies!
    Darek

    hi Darek,
    Have you considered using SSIS for your code?  When you use SSIS, you can use data sources which are referenced by the packages, and the underlying connections to databases/servers can be changed without affecting the code.  In fact, if you use
    configuration files it becomes as simple as changing one record in a table to change where your data sources are pointing. Here is a blog on using ssis package configurations to manage data sources.
    http://dataqueen.unlimitedviz.com/2012/02/creating-an-ssis-package-template-with-predefined-package-configurations/
    SSIS is a really powerful way to manage your ETL requirements.
    Martina White

  • XML queries... Change the code from using Oracle db into MS SQL

    Hi, I am a new begginer in this field. I came accross to an article that focuses in Oracle's XSU approach.
    Currently, i am trying to convert the java code from using Oracle db to MSSQL db. The code has shown below:
    import javax.naming.*;
    import javax.sql.*;
    import java.sql.*;
    import oracle.xml.sql.query.*;
    public class testxml
         public static void main(String args[]) throws SQLException, NamingException
         String tabName = "emp";
         int maxRows = 3;
         Context ctx = new InitialContext ();
         DataSource ds = (DataSource) ctx.lookup ("MyOra");
         Connection conn = ds.getConnection ();
    OracleXMLQuery qu = new OracleXMLQuery (
    conn, "select EMPNO, ENAME from " + tabName);
    qu.setMaxRows (maxRows);
    qu.setRowsetTag ("EMPLOYERS");
    qu.setRowTag ("PERSON");
    String xmlString = qu.getXMLString();
    System.out.println (xmlString);
    conn.close ();
    Currently, i am having difficulties to change the "bold" area that uses Oracle into MS SQL as my current application is using MS SQL as the database.
    Please help and need more advices from all of you. Thank You

    I resolved this issue myself. For the answer please message me.

  • How to make code portable

    Hi,
    I have a question like how can one make the following java code portable on different enviroments. What are the parts of the code that are not portable and how to rewrite the code in more portable manner.
    Here is the code.
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * Some not very portable Java code. This code obtains a letter from the user
    * and gets a corresponding integer from a binary array stored in a file. The
    * value "base" is the starting position for the array in the file. The method
    * "readbyte" reads one byte from the file at a given position. This code is
    * assumed to occur within method Main of a public Java class.
    public class Portable {
         public static void main(String args[])throws IOException  {
              int letter, start, base=0, val;
              int inbuf[] = new int[50];
              byte inb;
              RandomAccessFile ra = new RandomAccessFile("abc.txt","rw");
              //DataInputStream dr = new DataInputStream(fr);
              System.out.print("Enter a letter between A and Z: ");
              letter = (int) System.in.read();
              if ((letter >= (int) 'a') && (letter <= (int) 'a' + 25)) {
                   letter = letter - 32;
              if ((letter >= (int) 'A') && (letter <= (int) 'A' + 25)) {
                   start = base + 4 * (letter - (int) 'A');
                   val = 0;
                   for (int pos = start; pos < start + 4; pos++) {
                        ra.seek(pos);
                        inb = ra.readByte();
                        val = (val << 8) + ra.readByte();
                   System.out.println("The value stored at position " + letter
                             + " is " + val);
    }Any help would be great.
    Thanx.

    I can't see any code which stores any data, but the byte order for an int can be different on different platforms, but that's more related to the format of the file.
    Kaj

  • How to make code in dreamweaver flow to the next line?

    The line lengths of my code are really really long. How do I make it automatically flow to the next line without causing it to actually be a new line? Just for viewing purposes. I don't like having to scroll all the way to the end of the line of code to add a close tag.

    Hi
    Right-click on the area next to the 'box' that has the page title, and select 'coding' to enable the coding toolbar, (appears on the l/h side of the code window) then select the word wrap icon, see image -
    PZ

  • How to make XSLT files in ORACLE :-(

    Hi
    I am very new to the world of XML.
    I can create XML from the SQL queries but need to transform them in to a specific format. I think I need XSLT for transformation, but I could not find a way to make one using oracle.
    I want to ask, if there is any way that can be generated or will have to create on manually...
    Thanks in advance
    Rashid

    Refer
    http://www.oracle.com/technology/pub/articles/vohra_xsql.html

  • How to make automated procedure in Oracle

    Hello:
    I'm using PL/SQL Developer Version: 7.0.3.1123 and Oracle 11g. I've written the following procedure:
    INSERT INTO refill_summary
    SELECT to_date(to_char(RefillDate, 'dd-MON-YYYY')),
    SUM(REFILLAMOUNT),
    0,
    SUM(REFILLAMOUNT)
    FROM refill_cdr
    WHERE RefillDate BETWEEN to_date('03-AUG-2011 00:00:00', 'dd-MON-YYYY HH24:MI:SS') AND
    to_date('03-AUG-2011 23:59:59', 'dd-MON-YYYY HH24:MI:SS')
    GROUP BY to_date(to_char(RefillDate, 'dd-MON-YYYY')), 0
    It summarizes from data from detail table and inserts into summary table.
    Now I want to run it automatically everyday at 8:00:00 AM. And it'll summarizes the data of previous date and insert into summary table. i.e Suppose today is 20-AUGUST-2011. The script will run at 8:00:00 AM (20 Aug, 2011) but it'll summarize the data of date 19-AUGUST-2011 and insert summary into summary table.
    Please tell me where to modify my script (rewrite) and tell me the steps to make it automated.
    Thanks in advance.
    -Tanvir

    Note you're on the Oracle SQL Developer forum, not the third party PL/SQL Developer... please use their forum.
    If you want to do it in pure SQL, you read the docs about DBMS_SCHEDULER and/or ask in the SQL And PL/SQL forum.
    Have fun,
    K.

  • How to make code work for previous versions

    Hello, i have written the code below using swing 1.4. I was wondering if anyone could help me by letting me know what to convert so i run run this on a machine with a lower java runtime (ie 1.22)
    What i am trying to do is have a tree with a list of files, and when u click on a node, the tree will expand, and send the node name accross to another frame. Help is most appreciated. Thanks
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.TreeSelectionListener;
    import javax.swing.event.TreeSelectionEvent;
    import java.net.*;
    import java.applet.AppletContext;
    import java.util.Enumeration;
    public class SimpleTree extends JApplet  {
    JTree tree = new JTree();
      public void init() {
       new SimpleTree();
      public SimpleTree() {
    /*try {
          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch(Exception e) {
          System.out.println("Error setting native LAF: " + e);
        Container content = getContentPane();
        Object[] hierarchy =
          {"WebSphere MQ",
            new Object[] { "400","400 Pstuff.htm",
         "400 PStuff.htm",
         "A406 - Pstfdfs.htm"}}
        DefaultMutableTreeNode root = processHierarchy(hierarchy);
        tree = new JTree(root);
        tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
        tree.addTreeSelectionListener(new TreeSelectionListener() {
        public void valueChanged(TreeSelectionEvent e) {
             DefaultMutableTreeNode node = (DefaultMutableTreeNode)
             tree.getLastSelectedPathComponent();
             String stringname = tree.getLastSelectedPathComponent().toString();
             if (node == null) return;
             if (node.isLeaf()) {
                try {
                           getAppletContext().showDocument(new URL("http://mql3service.hursley.ibm.com/process/"+stringname), "viewer");
                  }catch(Exception f) {System.out.println("" + f); }   
        content.add(new JScrollPane(tree), BorderLayout.CENTER);
        setSize(500, 700);
        setVisible(true);
      public DefaultMutableTreeNode processHierarchy(Object[] hierarchy) {
        DefaultMutableTreeNode node =
          new DefaultMutableTreeNode(hierarchy[0]);
        DefaultMutableTreeNode child;
        for(int i=1; i<hierarchy.length; i++) {
          Object nodeSpecifier = hierarchy;
    if (nodeSpecifier instanceof Object[]) // Ie node with children
    child = processHierarchy((Object[])nodeSpecifier);
    else
    child = new DefaultMutableTreeNode(nodeSpecifier); // Ie Leaf
    node.add(child);
    return(node);
    public void Rupz(String random)
    TreePath path = null;
    TreeNode [] treenode = null ;      
    String strNode = random;
    DefaultMutableTreeNode root = (DefaultMutableTreeNode)tree.getModel().getRoot();
    Enumeration e = root.breadthFirstEnumeration();
    while(e.hasMoreElements())
    DefaultMutableTreeNode dftTmp = (DefaultMutableTreeNode)e.nextElement();
    if(dftTmp.toString().equals(strNode))
         treenode = dftTmp.getPath();
         path = new TreePath(treenode) ;
    try {
    getAppletContext().showDocument(new URL("http://mql3service.hursley.ibm.com/process/"+strNode), "viewer");
         }catch(Exception f) {
         System.out.println("" + f);           
    if(path != null)
         tree.setSelectionPath(path);
    repaint();
    public static void main(String [] args) {
    JFrame f = new JFrame("") ;
    Container contentPane = f.getContentPane();
    contentPane.setLayout(new FlowLayout());
    SimpleTree ta = new SimpleTree() ;
    ta.init() ;
    f.addWindowListener(new ExitListener());
    f.setSize(500,700);
    contentPane.add(ta,BorderLayout.CENTER);
    f.setVisible(true) ;

    hi!
    you can get lead selection in the action handler then inset your code for currentContextElement.
    wdContext.currentContextElement().getTableSorter().sort(wdEvent, wdContext.nodeXXX());
    thanks
    vishal

  • How to make recursive query in oracle

    Dear Experts:
    I have "Employees" table and "Departments" Table
    The structure of Dept Table is:
    ID   primary key
    parent_dept   foreign key(id)
    deptname  varchar2
    deptType varchar2
    The Employee table structure is
    ID primary key
    dept_id foreign key(Department.id)
    empName varchar2Sample data for departments
    ID : 1
    parent_dept : null
    deptname: General Manager office
    deptType : 'GM'
    ID :=2
    parent_dept : 1
    deptname: Information tech.
    deptType : 'DPT'
    ID :=3
    parent_dept : 2
    deptname: Software Development
    deptType : 'SECTION'Sample Data for employees
    ID : 101
    dept_id  :1
    empName  King
    ID : 102
    dept_id  :2
    empName  ALAN
    ID : 103
    dept_id  :2
    empName  SAM
    ID : 104
    dept_id  :3
    empName  JANEI want to create a query that accepts a parameter "p_department_id" and returns All employees on the following conditions
    1- In case the parameter value is null , then retrieve All Employees "king - alan- sam-jane"
    2- In Case the parameter value is 1 , then retrieve all the employees under department id =1 in addition to all the employees located under the children departments.
    in this case it will be "king - alan- sam-jane"
    3- In case parameter value is 2 , then return all the employees under department id =2 in addition to all the employees located under the children departments.
    In this case it will be " alan- sam-jane"
    4- In case parameter value is 3 , then return all the employees under department id =3 in addition to all the employees located under the children departments.
    in this case it will be only "JANE"
    In brief , If I pass any value to the parameter :p_department_id , I want to retrieve all employees located in this department in addition to other employees located in the child's nodes of this department id
    Please help me
    Thanks

    This is the forum for SQL Developer, not for general SQL or PL/SQL questions.
    Please repost this in the SQL and PL/SQL forum.

  • How to insert arabic&english  from oracle clients like TOAD,SQL*PLUS

    Hi
    iam trying to insert arabic&english data from TOAD&SQLPLUS.
    if i try to insert arabic by copy and paste iam getting ???? and
    if i try to insert through my keyboard (after updating my system with regional
    settings) iam able to type some junk characters.
    I have installed Oracle 8.1.6 with characterset set to UTF8 and
    in my client NLS_LANG settings i have tried with different settings like:-
    AMERICAN_AMERICA.UTF8
    AMERICAN_AMERICA.AR8MSAWIN
    ARABIC_UNITED ARAB EMIRATES.UTF8
    ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256
    i have also updated INIT.ORA nls_language ='ARABIC'.
    but still iam getting same problem.
    any help in this appriciated.
    Thanks
    Srinivas

    Are you able to use Arabic with your Java VM in general? Or are you having problems specific to your database interactions? Sun provides an internationalized version of the JDK and also an "English only" version. Perhaps you have the English only version? I would recommend trying a simple Hello World app with your JVM first... I would also check your JDBC driver documentation and make sure there are no limitations there, and that your database is also setup for internationalization.
    It is certainly possible to use TopLink in internationalized environments as we have lots of customers doing this, so hopefully we can figure out what is wrong with your setup.
    - Don

  • How to make a file to be opened in PL-SQL Editor of SQL Developer

    How to open a package file (.pkg) in sql Developer's PL-SQL Editor?
    Tried creating a new file type with Extension as .pkg and file type as PlSqlNode.
    Could open the file and found some of the features of plsql editor, such as find, compile... but could not differentiate the font colors.
    How should we go about in having the file opened with different font colors (for identifier, builtin....?
    Thanks.
    K.Nataraja Suthan,

    I guess you're running into another known bug in this file-based battlefield.
    Opening files won't colour the code until having opened some code from the DB first. Can you try that?
    On a sidenote, I've had really bad experiences with external files (both compiling to DB and saving to file incorrectly, not showing errors, etc.). In the end the only safe thing to do is work directly on the DB, saving your progress now and then to file.
    Regards,
    K.

  • How to create ODBC connection between Oracle 10g and MS SQL Server

    Hi,
    Can someone help us with the steps to create an ODBC connection between Oracle APPS using Oracle 10g database and MS SQL Server.
    Requirement is to extract the transactional data from MS SQL Server on a daily basis and dump it into Oracle tables for an interface to be run. Currently it is being done through Dataloader tool which we feel is causing the data issue with Arabic characters. We want to create the ODBC directly between Oracle and MS SQL Server and check if the data is being pulled correctly.
    The data is in sql server 2000 which has data in Arabic_CI_AS character set which is moved to Oracle 10.2.0.3 database with characterset AL32UTF8. The table data is moved to oracle using the dataloader 3.6 standard edition licensed version. We cannot change the character set of Sql Server 2000.
    Please help
    Thanks
    Shanil

    Hi,
    If you're trying to PULL data from SQLServer into an Oracle database, you wouldnt use Oracle ODBC driver for that, so you may want to post in the Heterogeneous Services forum instead:
    Heterogeneous Connectivity
    If you're trying to PUSH data from SQLServer into an Oracle database, you could use ODBC but most folks use OLEDB for that, and the following note on MOS should help:
    How to Create a Sql Server Linked Server With The Oracle Provider for OLE DB     (Doc ID 191368.1)
    As with any NLS related issue, the first thing to do is dump the codepoints of the data in the Oracle database to see if it is stored validly, rather than relying on what the data "looks like" from some tool or other. It's best to check a single row, with only a few characters in it if you can, and you can do that via
    SELECT DUMP(<columname>,1016) FROM <tablename> WHERE ...
    Hope it helps,
    Greg

  • How to make 3 similar fun's does generate different sql string in 1 db call

    Hi All,
    In my sql package I'm using 3 different functions to create two different sql strings and the 3rd function does some percentage calculations. My Db architect on code review suggest me that those two functions are almost the same except the sql string it does generate. So she asked me to write one function that does everything in one db call.
    "_Function 1_"
    FUNCTION get_class_select_text
         in_report_parameter_id IN NUMBER
    RETURN VARCHAR2
    IS
    my_class_select_text VARCHAR2(10000);
    my_class_select_value VARCHAR2(10000);
    CURSOR class_select_text IS
         SELECT 'SUM(DECODE(bin_id, ' || report_parameters.report_parameter_value
                        || ', bin_value, 0)) "Class ' || report_parameters.report_parameter_value || '" '
    FROM report_parameters
    WHERE report_parameters.report_parameter_id = in_report_parameter_id
    AND report_parameters.report_parameter_group = 'CLASS'
    AND report_parameters.report_parameter_name = 'CLASS'
    GROUP BY
    report_parameters.report_parameter_value
    ORDER BY
    CAST(report_parameters.report_parameter_value AS NUMBER);
    BEGIN
    my_class_select_text := '';
    OPEN class_select_text;
    LOOP
    FETCH class_select_text INTO my_class_select_value;
    EXIT WHEN class_select_text%NOTFOUND;
    my_class_select_text := my_class_select_text || ', ' || my_class_select_value;
    END LOOP;
    CLOSE class_select_text;
    RETURN my_class_select_text;
    END get_class_select_text;
    FUNCTION 2:
    FUNCTION get_class_sum_text
         in_report_parameter_id IN NUMBER
    RETURN VARCHAR2
    IS
    my_class_sum_text VARCHAR2(10000);
    my_class_sum_value VARCHAR2(10000);
    CURSOR class_sum_text IS
         SELECT 'SUM(NVL("Class ' || report_parameters.report_parameter_value || '", 0)) "Class ' || report_parameters.report_parameter_value || '" '
    FROM report_parameters
    WHERE report_parameters.report_parameter_id = in_report_parameter_id
    AND report_parameters.report_parameter_group = 'CLASS'
    AND report_parameters.report_parameter_name = 'CLASS'
    GROUP BY
    report_parameters.report_parameter_value
    ORDER BY
    CAST(report_parameters.report_parameter_value AS NUMBER);
    BEGIN
    my_class_sum_text := '';
    OPEN class_sum_text;
    LOOP
    FETCH class_sum_text INTO my_class_sum_value;
    EXIT WHEN class_sum_text%NOTFOUND;
    my_class_sum_text := my_class_sum_text || ', ' || my_class_sum_value;
    END LOOP;
    CLOSE class_sum_text;
    RETURN my_class_sum_text;
    END get_class_sum_text;
    FUNCTION 3:
    FUNCTION get_class_perc_text
         in_report_parameter_id IN NUMBER
    RETURN VARCHAR2
    IS
    my_class_perc_text VARCHAR2(10000);
    my_class_perc_value VARCHAR2(10000);
    CURSOR class_perc_text IS
    SELECT 'ROUND((("Class ' || report_parameters.report_parameter_value || '" / "Total") * 100), 2) "Class ' || report_parameters.report_parameter_value || '" '
    FROM report_parameters
    WHERE report_parameters.report_parameter_id = in_report_parameter_id
    AND report_parameters.report_parameter_group = 'CLASS'
    AND report_parameters.report_parameter_name = 'CLASS'
    GROUP BY
    report_parameters.report_parameter_value
    ORDER BY
    CAST(report_parameters.report_parameter_value AS NUMBER);
    BEGIN
    my_class_perc_text := '';
    OPEN class_perc_text;
    LOOP
    FETCH class_perc_text INTO my_class_perc_value;
    EXIT WHEN class_perc_text%NOTFOUND;
    my_class_perc_text := my_class_perc_text || ', ' || my_class_perc_value;
    END LOOP;
    CLOSE class_perc_text;
    my_class_perc_text := my_class_perc_text || ', ' || 'DECODE("Total", -1, 0, 100) "Total" ';
    RETURN my_class_perc_text;
    END get_class_perc_text;
    Could anyone help me?
    Thanks in advance.

    Hi ,
    Thanks a lot for your reply and tips how to post the code.
    As you know that previously I used 3 different variables called
    my_class_select_text,
    my_class_sum_text,
    my_class_perc_text
    to get corresponding values. I'm using these values in a dynamic SQL like below in the code.
          SELECT 3 "Rank", '
        || '            ''Final Row'' "Row Type", '
        || '            TRUNC(edr_rpt_tmp_bin_periods.bin_start_date_time ) "Date", '
        || '            MAX(edr_rpt_tmp_bin_periods.bin_end_date_time) - numtodsinterval(0.000000001, ''SECOND'') "Date/Time", '
        || '            '''' "Lane", '
        || '            ''Total'' "Hour"  '
        ||              my_class_sum_text
        || '                           , '
        || '             SUM(NVL(" ", 0)) " " '
        || '           FROM ( '
        || '                  SELECT edr_class_by_hour_report_data.bin_start_date_time start_date_time '
        ||                               my_class_select_text || ', '
        || '                             SUM(NVL(edr_class_by_hour_report_data.bin_value, 0)) " " '
        || '                    FROM edr_class_by_hour_report_data '
        || '             GROUP BY edr_class_by_hour_report_data.bin_start_date_time '
        || '                ) results '
       As per your new function it returns in a single parameter called 'my_class_perc_text' . Now I dont know how to use single variable in these places?
    Hope you could understand my question.
    I used to display code. :)
       Thanks once again.
    Edited by: user10641405 on May 21, 2009 2:06 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • How to create a Virtual Tour from a panorama

    Hey All, I'm trying to create a Virtual Tour from an already stitched 360 Panoramic interior photo (taken with a fish eye lens). Are there any programs throughout the Adobe Suite/Cloud  that will allow me to generate a virtual tour from this image, e

  • How do I remove something from my Places?

    Hi, I was doing an update for a sound system and by mistake dragged the download into my places instead of my desktop. I've tried to (control + click) the download in my Places and when the list comes up for Places/Sidebar preferences the sound syste

  • Install CS5 extended on Imac

    how do I install CS5 extended on my new iMac?  I have read to download trial version then add in serial number - but I cannot find a trial version of CS5 extended.

  • Inserting App Simulations in a Course

    Can someone please give me some good advice? I am planning to create courses which will contain recordings for application simulations (Training Simulations and Assessment Simulations). My issue is that one course will probably contain between 5 to 1

  • I upgraded my Q10 to 10.2.1.537- HELP

    I upgraded my software version on my Q10 to 10.2.1.537 and now I am unable to delete any email message that comes into my phone. The prompt comes up but will not allow me to delete. Please help me as I get many emails and I need to delete many of the