SQL Query (Oracle 10g)

Hi All,
Please find the following requirement.
Requirement -
There are 2 standalone database named database A and
database B used by 2 separate application. Database A
has schema S1 and Database B has schema S2.
Schema S1 has around 40 master tables which get updated
very frequently. This 40 tables are also present in S2
also.
We want the both the 40 tables to be in sync every
hourly or half any hour.
eg. If records are added/updated deleted in S1.emp then
same should be done in S2.emp and visa versa also.
We dont want to use dblink,materialised views or
scripts. Is there any feature in Oracle 10G like
replication or Streams where in this can be done.
Incase if are not able to replicate both ways then at
least one way can we replicate ? like any records are
added/updated deleted in S1.emp then same should be done
in S2.emp and similarly in the other 39 tables.
Thank you
Message was edited by:
User71408

Can anyone provide a SQl query to create a
schema/user named 'test' with username as 'system'
and password as 'manager'system user is created during database creation, it's internal Oracle admin user that shouldn't be used as schema holder.
In Oracle database, Oracle user is schema holder there's no seperate schema name to be defined other than username.

Similar Messages

  • Problem executing a sql query in 10g environment

    Hi,
    I am having problem executing the following sql query in 10g environment. It works fine in 8i environment.
    I tried to_number(to_char) and it did not work.
    **A.APPL_ACTION_DT >= TO_CHAR("&v_strBeginStatusDate&", 'DD-MON-YYYY') AND A.APPL_ACTION_DT <= TO_CHAR("&v_strEndStatusDate&", 'DD-MON-YYYY')))**
    Any suggestions..
    --Pavan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I would be surprised if that worked in 8i as posted, although I no longer have 8i to test. You do not tell us the error message you are getting, but there are several things wrong with what you posted.
    First, the substitution variable requires only the & at the beginning, you have one on each end of your string, the one at the end will remain in the string that is passed to the database.
    Second, you cannot TO_CHAR a string with a date format as you are trying to do. The TO_CHAR function is overloaded and has two basic forms TO_CHAR(date, format_model) and TO_CHAR(number, format_model). Note that neither takes a string. It would appear that at least current versions of Oracle choose the second signature unless specifically passed a date datatype.
    SQL> select to_char('&h', 'dd-mon-yyyy') from dual;
    Enter value for h: 12
    old   1: select to_char('&h', 'dd-mon-yyyy') from dual
    new   1: select to_char('12', 'dd-mon-yyyy') from dual
    select to_char('12', 'dd-mon-yyyy') from dual
    ERROR at line 1:
    ORA-01481: invalid number format modelalthough I suspect that the error you are getting with your posted code is more likely to be ORA-01722: invalid number.
    Depending on the data type of appl_action_date, you are probably lokoing for TO_DATE instead of TO_CHAR.
    John

  • Learning PL/SQL in Oracle 10G XE

    Successfully installed Oracle 10G XE on my desktop. I'm a newbie Oracle user who wants to learn PL/SQL through Oracle 10G XE.
    Is this possible? Hope you can give me tips and advice on how I would start with this?
    Thanks!

    Certainly possible. I would suggest you crack open the PL/SQL Users Guide. DO you have previous programming experience? If so, looks at the examples.

  • Retrieve a range of records from SQL query Oracle

    I want to retrieve range of rows in Oracle database. This is the table structure:
    CREATE TABLE ACTIVESESSIONSLOG(
      ASESSIONID VARCHAR2(30 ) NOT NULL,
      USERID VARCHAR2(30 ),
      ACTIVITYSTART TIMESTAMP(6),
      ACTIVITYEND TIMESTAMP(6),
      ACTIVITY CLOB
    /This is the SQL command that I use to get rows from the table:
    SELECT * FROM ACTIVESESSIONSLOG WHERE ROWNUM >= 5 AND ROWNUM <= 10 ORDER BY USERID ASC;When I rum it no data is displayed. What is the proper way to get only 5 rows from the database?
    Best wishes
    Peter

    Is this SQL query valid?I tend to say no: ORDER BY is applied last, so your rownum is not in correct anymore:
    SQL> select rownum, ename, empno from emp order by empno
        ROWNUM ENAME           EMPNO
             3 SMITH            7369
             4 ALLEN            7499
             5 WARD             7521
             6 JONES            7566
             7 MARTIN           7654
             8 BLAKE            7698
             9 CLARK            7782
             2 SCOTT            7788
            10 KING             7839
            11 TURNER           7844
            12 ADAMS            7876
             1 JAMES            7900
            13 FORD             7902
            14 MILLER           7934
    14 rows selected.You either use analytic ROW_NUMBER() as in my previous post - or you need to nest once again:
    SQL> select rn, empno, ename
      from (select rownum rn, ename, empno
              from (  select ename, empno
                        from emp
                    order by empno))
    where rn between 4 and 5
            RN      EMPNO ENAME    
             4       7566 JONES    
             5       7654 MARTIN   
    2 rows selected.

  • Calling java from pl/sql in oracle 10g?its very urgent.

    Hi Friends,
    i hve simple java code:
    class Hell
    public static String Hello()
    return"hello world";
    & compile this code using javac & loaded Hell.class in to database using this command
    c:\>loadjava -user chandru/shekar@pulser c:\Hell.class
    & i wrote pl/sql like:
    CREATE OR REPLACE FUNCTION Hell RETURN String as language java name 'Hell.Hello() return java.lang.String';
    i will compile the code & run but at that time this error i am getting:
    ORA-29516: Aurora assertion failure: Assertion failure at eox.c:317
    Uncaught exception System error: java/lang/UnsupportedClassVersionError
    I am using oracle 10g.Plzzzzzzzzz help me.Its very important to for me.
    Is any path i hve to set for oracle 10g database.Plz any one help me.
    regards
    shekar

    Hello here is how I solved the problem
    Let us assume that i try to load the file Hello.Java into the user scott.
    public class Hello {
         public static String world() {
              return "hello world";
    1) Dropjava          
    You must drop the java class if you already have loaded the class onto the server.
    dropjava -u scott/tiger Hello.class
    2) load class on server and let the server compile the source code.
    It is necessary to compile the source code on the server when the server and the local machine have different Java versions. To check which Java version there is running on the client machine open a command prompt and write Java -version
    loadjava -user scott/tiger -resolve Hello.java
    3) Publish stored procedure      
    sqlplus scott/tiger@oracle
    CREATE OR REPLACE FUNCTION helloworld RETURN VARCHAR2 AS                LANGUAGE JAVA NAME 'Hello.world () return java.lang.String';
    4)Call stored procedure      
    VARIABLE myString VARCHAR2(20);
    CALL helloworld() INTO :myString;
    PRINT myString;
    RGDS
    Thomas Winterberg

  • Open cursor query - oracle 10g

    Could anyone tell me which is the right query for fetching open cursor:
    1.
    select max(a.value) as highest_open_cur,s.sid, s.username, oc.sql_text, s.logon_time, s.status, s.machine
    from v$sesstat a, v$statname b, v$parameter p, v$session s, v$open_cursor oc
    where a.statistic# = b.statistic#
    and b.name = 'opened cursors current'
    and p.name= 'open_cursors'
    and username in ('USER_ID')
    and s.sid = a.sid
    -- and s.status <> 'KILLED'
    and oc.sid = s.sid
    group by s.sid,s.username, oc.sql_text, s.logon_time, s.status, s.machine
    order by s.logon_time desc
    2.
    SELECT user_name,sid,sql_text,count(1) total,sysdate snap_time
    FROM v$open_cursor
    WHERE user_name IN ('USER_ID')
    GROUP BY user_name,sid,sql_text
    HAVING count(1)>0;
    The issue is inthe secind query we have had hardly any open cursors and from the first query we are getting quiet a lot.
    Would like someone to explain me the the interpretation of both the queries.
    Does Oracle 10g has a different interpretation of these tables.
    How should we be reading the open cursors? and
    Does anyone feel there is a better way to check for open cursors ?

    ...etc...
    How should we be reading the open cursors? and
    Does anyone feel there is a better way to check for
    open cursors ?Forget cursors, if your purpose is to do some kind of research for performance tuning, just generate either the Enterprise Manager ASH or ADDM reports.

  • Migrating from SQL to Oracle 10g -- Oracle Migration Work Bench

    All
    I've come across this tool from Oracle for Migrating SQL and mySQL databases to Oracle 10g. But the procedure and documentation was not clear. I wanted to try this once and hence I am posting here.
    Could you please share your experiences if you have also tried this one already? All your inputs will be of great help in helping me understand this tool and its usage.
    Thank you.
    Regards!
    Sarat.

    Sarat Chandra C wrote:
    All
    I've come across this tool from Oracle for Migrating SQL and mySQL databases to Oracle 10g. But the procedure and documentation was not clear. I wanted to try this once and hence I am posting here.
    Could you please share your experiences if you have also tried this one already? All your inputs will be of great help in helping me understand this tool and its usage.
    Thank you.
    Regards!
    Sarat.Could you please share what specific questions you have? What points of the documentation you found "unclear"?

  • Open connections query - Oracle 10g

    How do I get the number of connections opened by a specific user to oracle 10g db ?
    Can someone help me with the query / tables to query for the same.

    Thejas wrote:
    How do I get the number of connections opened by a specific user to oracle 10g db ?
    Can someone help me with the query / tables to query for the same.select count(*) from v$session where username = <sepcific_user>
    Reading documentation is always a suggestion.
    Regards

  • How to restore some *.sql in oracle 10g

    Hi someone gave me a cd with .sql backup and told me to restore it in oracle.
    Can someone tell me how to do it or some hints in the type of recovery I should use?
    Thanks

    mmm. not much detail in there. The .sql files are probably sqlplus scripts that at a guess create objects. If you're lucky they will also define the schema that they should be created in. The .zip file is probably a file of data either in some predefined format e.g. csv, in which case you can load it using sqlldr or it could be a big file of insert statements.
    My first steps would be -
    1/ find out which user the scripts are supposed to be run as.
    2/ read the .sql scripts to find out what they do and which order they should be run in
    3/ run the .sql scripts
    4/ look at the zipped file and work out how to load it.

  • SQL Loader Oracle 10g problem in upload date with time data -- Very urgent.

    Hi
    I am trying to upload data using SQL loader. There are three columns in the table
    defined as DATE. When I tried upload a data like this '2007-02-15 15:10:20', it is not loading time part. The date stored as 02/15/2008' only. There is not time on that. I tried with many different format nothing work. Can please help me ?
    I have also tried with to_date --> to_timestamp it did not work.
    The application is going to be in production, I cannot change DATE to TIME STAMP. This is very urgent.
    LASTWRITTEN "decode(:LASTWRITTEN,'null',Null, to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:Mi:SS'))",
    CREATEDON "decode(:CREATEDON,'null',Null, to_date(:CREATEDON,'YYYY-MM-DD HH24:Mi:SS'))",
    LASTUPDATEDON(21) "decode(:LASTUPDATEDON,'null',Null, to_date(:LASTUPDATEDON(21),'DD/MM/YYYY HH24:MI:SS'))"

    Your problem is most likely in decode - the return type in your expression will be character based on first search value ('null'), so it will be implicitly converted to character and then again implicitly converted to date by loading into date column. At some of this conversions you probably are loosing your time part. You can try instead use cast:
    SQL> desc t
    Name                                      Null?    Type
    LASTWRITTEN                                        DATE
    CREATEDON                                          DATE
    LASTUPDATEDON                                      DATE
    SQL> select * from t;
    no rows selected
    SQL> !cat t.ctl
    LOAD DATA
    INFILE *
    INTO TABLE T
    TRUNCATE
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    LASTWRITTEN
    "decode(:LASTWRITTEN,'null',cast(Null as date),
      to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:MI:SS'))",
    CREATEDON
    "decode(:CREATEDON,'null',cast(Null as date),
      to_date(:CREATEDON,'YYYY-MM-DD HH24:MI:SS'))",
    LASTUPDATEDON
    "decode(:LASTUPDATEDON,'null',cast(Null as date),
      to_date(:LASTUPDATEDON,'DD/MM/YYYY HH24:MI:SS'))"
    BEGINDATA
    2007-02-15 15:10:20,null,null
    null,2007-02-15 15:10:20,null
    null,null,15/02/2007 15:10:20
    SQL> !sqlldr userid=scott/tiger control=t.ctl log=t.log
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Feb 29 00:20:07 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 3
    SQL> select * from t;
    LASTWRITTEN         CREATEDON           LASTUPDATEDON
    15.02.2007 15:10:20
                        15.02.2007 15:10:20
                                            15.02.2007 15:10:20Best regards
    Maxim

  • Need SQL Query - oracle 8i

    Hi,
    We are using Oracle 8i (Oracle8i Enterprise Edition Release *8.1.7.4.0 - 64bit Production*).
    My requirement is -
    I need output like
    USER_NAME Company
    Suri 01,86,65
    Srinu 01,86,65
    Here is the sample data.
    WITH t AS ( SELECT 'SURI' user_name ,'01' Company FROM dual UNION ALL
                SELECT 'SURI' user_name, '86' Company FROM dual UNION ALL
                SELECT 'SURI' user_name ,'65' Company FROM dual UNION ALL
                SELECT 'SRINU' user_name, '01' Company FROM dual UNION ALL
                SELECT 'SRINU' user_name ,'86' Company FROM dual UNION ALL
                SELECT 'SRINU' user_name ,'65' Company FROM dual )
    SELECT * FROM t ;
    USER_NAME     COMPANY
    SURI              01
    SURI              86
    SURI              65
    SRINU              01
    SRINU              86
    SRINU              65Many thanks in advance for the help.
    Thanks,
    Suri

    Use my HIERARCHY package:
    CREATE OR REPLACE
    PACKAGE Hierarchy
      IS
            TYPE BranchNameTableType IS TABLE OF VARCHAR2(4000)
              INDEX BY BINARY_INTEGER;
            BranchNameTable BranchNameTableType;
            TYPE BranchNumberTableType IS TABLE OF NUMBER
              INDEX BY BINARY_INTEGER;
            BranchNumberTable BranchNumberTableType;
            BranchSumTable BranchNumberTableType;
            PreviousLevel NUMBER;
            FUNCTION BranchName(pLevel     IN NUMBER,
                                pValue     IN VARCHAR2,
                                pDelimiter IN VARCHAR2 DEFAULT CHR(0)
              RETURN VARCHAR2;
            PRAGMA RESTRICT_REFERENCES(BranchName,WNDS);
            FUNCTION BranchNumber(pLevel     IN NUMBER,
                                  pRnum      IN NUMBER,
                                  pDelimiter IN VARCHAR2 DEFAULT '.'
              RETURN VARCHAR2;
            PRAGMA RESTRICT_REFERENCES(BranchNumber,WNDS);
            FUNCTION BranchSum(pLevel IN NUMBER,
                               pValue IN NUMBER
              RETURN NUMBER;
            PRAGMA RESTRICT_REFERENCES(BranchSum,WNDS);
            FUNCTION BranchProd(pLevel IN NUMBER,
                                pValue IN NUMBER
              RETURN NUMBER;
            PRAGMA RESTRICT_REFERENCES(BranchProd,WNDS);
            FUNCTION IsNewBranch(pLevel IN NUMBER,
                                  pRnum  IN NUMBER
              RETURN NUMBER;
            PRAGMA RESTRICT_REFERENCES(IsNewBranch,WNDS);
    END Hierarchy;
    CREATE OR REPLACE
      PACKAGE BODY Hierarchy
        IS
            ReturnStrValue VARCHAR2(4000);
            ReturnNumValue NUMBER;
        FUNCTION BranchName(pLevel     IN NUMBER,
                            pValue     IN VARCHAR2,
                            pDelimiter IN VARCHAR2 DEFAULT CHR(0)
          RETURN VARCHAR2
          IS
          BEGIN
              BranchNameTable(pLevel) := pValue;
              ReturnStrValue := pValue;
              FOR I IN REVERSE 1..pLevel - 1 LOOP
                ReturnStrValue := BranchNameTable(I)|| pDelimiter || ReturnStrValue;
              END LOOP;
              RETURN ReturnStrValue;
        END BranchName;
        FUNCTION BranchNumber(pLevel     IN NUMBER,
                              pRnum      IN NUMBER,
                              pDelimiter IN VARCHAR2 DEFAULT '.'
          RETURN VARCHAR2
          IS
          BEGIN
              BEGIN
                  IF pRnum = 1
                    THEN
                      BranchNumberTable.DELETE;
                  END IF;
                  BranchNumberTable(pLevel) := BranchNumberTable(pLevel) + 1;
                EXCEPTION
                  WHEN NO_DATA_FOUND
                    THEN
                      BranchNumberTable(pLevel) := 1;
              END;
              ReturnStrValue := BranchNumberTable(pLevel);
              FOR I IN pLevel + 1..BranchNumberTable.LAST LOOP
                BranchNumberTable.DELETE(I);
              END LOOP;
              FOR I IN REVERSE 1..pLevel - 1 LOOP
                ReturnStrValue := BranchNumberTable(I)|| pDelimiter || ReturnStrValue;
              END LOOP;
              RETURN ReturnStrValue;
        END BranchNumber;
        FUNCTION BranchSum(pLevel IN NUMBER,
                           pValue IN NUMBER
          RETURN NUMBER
          IS
          BEGIN
              BranchSumTable(pLevel) := pValue;
              ReturnNumValue := pValue;
              FOR I IN REVERSE 1..pLevel - 1 LOOP
                ReturnNumValue := BranchSumTable(I) + ReturnNumValue;
              END LOOP;
              RETURN ReturnNumValue;
        END BranchSum;
        FUNCTION BranchProd(pLevel IN NUMBER,
                            pValue IN NUMBER
          RETURN NUMBER
          IS
          BEGIN
              BranchSumTable(pLevel) := pValue;
              ReturnNumValue := pValue;
              FOR I IN REVERSE 1..pLevel - 1 LOOP
                ReturnNumValue := BranchSumTable(I) * ReturnNumValue;
              END LOOP;
              RETURN ReturnNumValue;
        END BranchProd;
        FUNCTION IsNewBranch(pLevel IN NUMBER,
                             pRnum  IN NUMBER
          RETURN NUMBER
          IS
          BEGIN
              IF pRnum = 1
                THEN
                  PreviousLevel := pLevel;
                  RETURN 1;
              END IF;
              IF pLevel > PreviousLevel
                THEN
                  PreviousLevel := pLevel;
                  RETURN 0;
                ELSE
                  PreviousLevel := pLevel;
                  RETURN 1;
              END IF;
        END IsNewBranch;
    END Hierarchy;
    /Now:
    WITH t AS ( SELECT 'SURI' user_name ,'01' Company FROM dual UNION ALL
                SELECT 'SURI' user_name, '86' Company FROM dual UNION ALL
                SELECT 'SURI' user_name ,'65' Company FROM dual UNION ALL
                SELECT 'SRINU' user_name, '01' Company FROM dual UNION ALL
                SELECT 'SRINU' user_name ,'86' Company FROM dual UNION ALL
                SELECT 'SRINU' user_name ,'65' Company FROM dual ),
         t1 AS (
                SELECT  user_name,
                        company,
                        row_number() over(partition by user_name order by company) rn,
                        count(*) over(partition by user_name) cnt
                  FROM  t
         t2 AS (
                SELECT  user_name,
                        Hierarchy.BranchName(level,company,',') company,
                        cnt,
                        rn
                  FROM  t1
                  START WITH rn = 1
                  CONNECT BY user_name = PRIOR user_name
                         AND rn = PRIOR rn + 1
    SELECT  user_name,
            company
      FROM  t2
      WHERE rn = cnt
    USER_NAME  COMPANY
    SRINU      01,65,86
    SURI       01,65,86
    SQL> SY.

  • Write an UPdate statement using the logic used in PL/SQL block (oracle 10g)

    Hi All,
    I have written the following PL/SQL block. I want to write an UPDATE statement using the logic used in the following PL/SQL block. can any one please help me out in this regards.
    DECLARE
       v_hoov_fag   gor_gold_post.hoov_flg%TYPE;
       v_b49n          gor_gold_post.b49n%TYPE;
       CURSOR c
       IS
          SELECT bs_id, loyalty_date, loyalty_period, contract_date
            FROM gor_gold_post
           WHERE tariff_code IN (169, 135, 136);
    BEGIN
       FOR rec IN c
       LOOP
          IF    (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                        - SYSDATE) < 304
             OR (    TRUNC (  ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                            - SYSDATE
                           ) IS NULL
                 AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
          THEN
             v_hoov_flg := 1;
          ELSE
             v_hoover_flag := 99;
          END IF;
          IF    (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                        - SYSDATE) < 121.6
             OR (    TRUNC (  ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
                            - SYSDATE
                           ) IS NULL
                 AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
          THEN
             v_b49n := 1;
          ELSE
             v_b49n := 99;
          END IF;
          UPDATE gor_gold_post
             SET hoov_flg = v_hoov_flg,
                 b49n = v_b49n
           WHERE bs_id = rec.bs_id AND tariff_code IN (169, 135, 136);
          COMMIT;
       END LOOP;
    END;Thank you,

    Using case statement.
    UPDATE gor_gold_post
       SET hoov_flag = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 304
                                   OR
                                   (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
                                AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
                           THEN 1
                           ELSE 99
                         END,
           b49n      = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 121.6
                             OR
                             (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
                                AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
                           THEN 1
                           ELSE 99
                         END
    WHERE tariff_code IN (169, 135, 136);Note: Code not tested.

  • SQL Query (oracle 10.2.0.3.0)

    Hi All,
    I have columns called Ph_Num in Table EMP.
    the values of these columns as follows.
    PH_NUM
    8614558500-8614558505||8614558550||8614558555But I want to modify it as
    PH_NUM
    014/55.85.00||014/55.85.05||014/55.85.50||014/55.85.55OR
    PH_NUM
    014/55.85.00-014/55.85.05||014/55.85.50||014/55.85.55can any one please help me to write a query for this.
    Thank you,
    SSH

    Hi All,
    I have written the folowing query.
    SELECT DECODE (SUBSTR (PHNUM, 1, 1),
                         '2', '0'
                          || SUBSTR (PHNUM, 1, 1)
                          || '/'
                          || SUBSTR (PHNUM, 2, 3)
                          || '.'
                          || SUBSTR (PHNUM, 5, 2)
                          || '.'
                          || SUBSTR (PHNUM, 7, 2),
                         '3', '0'
                          || SUBSTR (PHNUM, 1, 1)
                          || '/'
                          || SUBSTR (PHNUM, 2, 3)
                          || '.'
                          || SUBSTR (PHNUM, 5, 2)
                          || '.'
                          || SUBSTR (PHNUM, 7, 2),
                         '4', DECODE (SUBSTR (PHNUM, 2, 1),
                                      '7', '0'
                                       || SUBSTR (PHNUM, 1, 3)
                                       || '/'
                                       || SUBSTR (PHNUM, 4, 2)
                                       || '.'
                                       || SUBSTR (PHNUM, 6, 2)
                                       || '.'
                                       || SUBSTR (PHNUM, 8, 2),
                                      '8', '0'
                                       || SUBSTR (PHNUM, 1, 3)
                                       || '/'
                                       || SUBSTR (PHNUM, 4, 2)
                                       || '.'
                                       || SUBSTR (PHNUM, 6, 2)
                                       || '.'
                                       || SUBSTR (PHNUM, 8, 2),
                                      '9', '0'
                                       || SUBSTR (PHNUM, 1, 3)
                                       || '/'
                                       || SUBSTR (PHNUM, 4, 2)
                                       || '.'
                                       || SUBSTR (PHNUM, 6, 2)
                                       || '.'
                                       || SUBSTR (PHNUM, 8, 2),
                                         '0'
                                      || SUBSTR (PHNUM, 1, 1)
                                      || '/'
                                      || SUBSTR (PHNUM, 2, 3)
                                      || '.'
                                      || SUBSTR (PHNUM, 5, 2)
                                      || '.'
                                      || SUBSTR (PHNUM, 7, 2)
                         '8', DECODE (SUBSTR (PHNUM, 3, 1),
                              '0','0'
                              || SUBSTR (PHNUM, 1, 3)
                              || '/'
                              || SUBSTR (PHNUM, 4, 2)
                              || '.'
                              || SUBSTR (PHNUM, 6, 3),
                              '0'
                              || SUBSTR (PHNUM, 1, 2)
                              || '/'
                              || SUBSTR (PHNUM, 3, 2)
                              || '.'
                              || SUBSTR (PHNUM, 5, 2)
                              || '.'
                              || SUBSTR (PHNUM, 7, 2)
                         '9', DECODE (SUBSTR(PHNUM, 2,1),
                              '0','0'
                              || SUBSTR (PHNUM, 1, 3)
                              || '/'
                              || SUBSTR (PHNUM, 4, 2)
                              || '.'
                              || SUBSTR (PHNUM, 6, 3),
                              '0'
                              || SUBSTR (PHNUM, 1, 1)
                              || '/'
                              || SUBSTR (PHNUM, 2, 3)
                              || '.'
                              || SUBSTR (PHNUM, 5, 2)
                              || '.'
                              || SUBSTR (PHNUM, 7, 2)
                         '0', SUBSTR (PHNUM, 1, 3)
                          || '/'
                          || SUBSTR (PHNUM, 4, 2)
                          || '.'
                          || SUBSTR (PHNUM, 6, 2)
                          || '.'
                          || SUBSTR (PHNUM, 8, 2),
                            '0'
                         || SUBSTR (PHNUM, 1, 2)
                         || '/'
                         || SUBSTR (PHNUM, 3, 2)
                         || '.'
                         || SUBSTR (PHNUM, 5, 2)
                         || '.'
                         || SUBSTR (PHNUM, 7, 2)
            FROM dual;Teh O/P is as follows.
    9914558500-9914558505||9914558550||9914558555
    But required O/P to be
    014/55.85.00||014/55.85.05||014/55.85.50||014/55.85.55
    OR
    014/55.85.00-014/55.85.05||014/55.85.50||014/55.85.55
    so please let me know what are the required modifications I need to do in the above mentioned query.
    Thank you

  • Help Me: trigger a pl/sql in oracle 10g

    hi am the beginner in pl/sql..am having the problem in triggering a pl/sql...i cant explain the whole problem here...i explained it in the following link plz click to see my problem...
    Message was edited by:
    ana_oracle

    Only problems that can be explained in this forum will be answered.

  • PL/SQL New Features for Oracle 10g

    Hi,
    If anybody asks what are the new features in PL/SQL for Oracle 10g version, what would be the answer?
    Thanks,
    Mrinmoy

    user3001930 wrote:
    Hi,
    If anybody asks what are the new features in PL/SQL for Oracle 10g version, what would be the answer?
    Thanks,
    MrinmoyI would say: Who cares about 10g features nowadays. And they I would tell them about the new 11g features (that I remember).

Maybe you are looking for

  • Cannot install itunes 7.7 with Vista due to bonjour service issues

    (I do have itunes version 7.6.2.9 working fine with no issues on vista)Cannot install itunes 7.7 becoz vista doesnt let bonjour service to run, While trying to start the Bonjour service from the Windows Services console gives an other error: "Windows

  • Creating a spatial index problem

    Hi there I have to create a table in Oracle Spatial and use it with MapInfo MapX 4.51 OCX to insert some features in it. I read a thread in the MapX forum where I learnt that I had to create my table (CREATE TABLE statement), add a record in MAPINFO_

  • Interactive guide to pick the right Home Theater System.

    Maybe someone else already had the same question, but I would like to put this again, What about to had and interactive guide on the besbuy.com to pick the right system, for example we start with the receiver a/v then with the speakers system and the

  • Year Ago Measure group by problem.

    Hi, In my report I have two measures Revenue and Revenue Year Ago. Revenue Year ago is calculated based on the Ago functionalty and the time dimension level is "Year" AGO(Fact.Revenue, TimeDimnesion."Year", 1). The problem is that the column measure

  • Unlocked third party purchase

    I purchased a unlocked samsong galaxy s3 neo/gt19300i from a third party and it came without a sim card will I beable to take to att store and have it added to my account?