Need Query to resolve

Hi All,
SELECT DECODE(UPPER('ACCOUNT'),'CHEQUE','N', 'DD','N', 'ON-SITE','Y','ACCOUNT','N', 'NO CHECK REQUIRED') FROM DUAL;
I need to take "NO CHECK REQUIRED" value, because we are getting always N for above query. but my problem is I dont have "N" or "Y" in certain combinations of data
in my table, so on that time I will check the data for "NO CHECK REQUIRED" for those combinations.
I am using above query in for LOOP, because i maintained big logic in that FOR loop condition.
Please help me to resolve .
Regards,
Apple.

/* Formatted on 10-29-2012 3:42:44 PM (QP5 v5.163.1008.3004) */
SELECT DECODE (UPPER ('ACCOUNT'),
               'CHEQUE', 'N',
               'DD', 'N',
               'ON-SITE', 'Y',
               'ACCOUNT', 'N', -- value matched here
               'NO CHECK REQUIRED')
  FROM DUAL;In the above code, since the value matches as 'ACCOUNT', it always gives as 'N'.
But looking at your case, i feel you should check this for the loop values and not hard-code as a string(like 'ACCOUNT').
Then, it'll be able to decide and return values as 'N', 'Y' or 'NO CHECK REQUIRED'.
Try somthing like this...
FOR i in (<your_query>)
LOOP
   SELECT DECODE (UPPER (i.<your_column>),
               'CHEQUE', 'N',
               'DD', 'N',
               'ON-SITE', 'Y',
               'ACCOUNT', 'N', -- value matched here
               'NO CHECK REQUIRED')
   FROM DUAL;
END LOOP;Please provide more inputs.
HTH
Ranit B.

Similar Messages

  • I need help in resolving a problem that prevents me from accessing the iTunes store.  Message reads " iTunes cannot contact the iTunes store" and also says that my laptop is no longer authorized to access my account.  Help!

    I need help in resolving a problem that prevents me from accessing the iTunes store.  Message reads " iTunes cannot contact the iTunes store" and also says that my laptop is no longer authorized to access my account.  Help!

    Go up to the top of your screen on iTunes and click on 'Store'.  Then go down to 'Authorize This Computer'.  That should cover part of it unless you've already authorized a bunch of other computers to use your account.  If that's the case, you'll have to go to one of those computers and click the button just below it to 'deauthorize your account' from that computer.  If you're not able to access the store, check your internet connection to make sure you are connected.  Hope this helps.. good luck!     

  • Need query to find out whether exactly 2 columns are used in any index ?

    Suppose i have two columns ID and Status (or any number of columns ) belongs to table customer...
    Now I want to create below index
    Ex. create index test1 on customer (ID , Status )
    But before creating this index i want to check that whether there is already index on these 2 columns ? May be by other name ?
    Need query for this.
    Plz help.

    Hi Shubhangi,
    Your requirement is very difficult to fulfill , i have made an attempt to replicate your reqrmnt & write a query wherein you need to compromise on few things , let us see if it works for you
    Supply table_name/owner & Number of column on which you want to find indexes
    e.g.
    select distinct INDEX_NAME,column_name
    from dba_ind_columns
    where index_name in (select distinct index_name
    from dba_ind_columns
    where table_name='&table_name'
    and table_owner='&owner'
    having count(column_name)=&column_count group by index_name);
    Enter value for table_name: ADDRESS
    Enter value for owner: ASAP
    Enter value for column_count: 2
    INDEX_NAME COLUMN_NAME
    FKIDX_AD__SF_ST_FO SF_STRUC_FORMAT_NM
    FKIDX_AD__SF_ST_FO SF_TYPE_NM
    SQL> /
    Enter value for table_name: ADDRESS
    Enter value for owner: ASAP
    Enter value for column_count: 3
    INDEX_NAME COLUMN_NAME
    FKIDX_AD__SF_ST_FO_1 POSTAL_CD
    FKIDX_AD__SF_ST_FO_1 SF_STRUC_FORMAT_NM
    FKIDX_AD__SF_ST_FO_1 SF_TYPE_NM
    Thanks,
    Ajay More
    http://moreajays.blogspot.com

  • The .txt file has formatting issues that need to be resolved

    Transaction ZEHS20 runs a program that assigns a CCL Group to a specification header, based on its Active Ingredients. The transaction can be run in the background if desired with output being emailed to the user.The .txt file has formatting issues that need to be resolved. can u  pls Help me to resolve this issue.
    Thanks

    What is the formatting issue like? Could you please elaborate a bit more.
    If it is because of varying lengths in the data then it can be handled by utilising a CONCATENATE RESPECTING blanks.

  • Need query to find rows

    hi
    i need query to find out for one perticular row from parent table ,,which references how many rows in how many child tables , and child to child tables. in herirachy fashion.
    if anybody know please help me

    I guess it would be difficult to come up with a generic script to get answer that can help in all situations...you have to see the table definitions in your schema and try...like in case of emp and dept table,
    select * from dept where deptno in
    (select deptno,count(*) from emp group by deptno having count(*)>1)
    (this gives rows from dept table where , for corresponding deptno there are more than one rows in emp table).
    Thanks
    Nirav

  • Need Query - join in same table

    I need query for following criteria,
    Table : test
    No     Order
    1     a
    1     b
    1     c
    2     a
    2     b
    2     d
    3     e
    3     f
    3     g
    3     h
    1     f
    2     f
    Consider the above table,
    1)     I will give input order as a,b: It should return No 1,2
    No     Order
    1     a
    1     b
    1     c
    2     a
    2     b
    2     d
    3     e
    3     f
    3     g
    3     h
    1     f
    2     f
    2)     I will give input order as f,g,h: It should return No 3
    No     Order
    1     a
    1     b
    1     c
    2     a
    2     b
    2     d
    3     e
    3     f
    3     g
    3     h
    1     f
    2     f
    Please give me the query which will give above result.
    Thanks

    I am not sure I understand you, but it may be this
    with test as (
    select 1 N, 'a' Ord from dual union all
    select 1,'b' from dual union all
    select 1,'c' from dual union all
    select 2,'a' from dual union all
    select 2,'b' from dual union all
    select 2,'d' from dual union all
    select 3,'e' from dual union all
    select 3,'f' from dual union all
    select 3,'g' from dual union all
    select 3,'h' from dual union all
    select 1,'f' from dual union all
    select 2,'f' from dual )
    select N from test tp where Ord = 'a'
    intersect
    select N from test tp where Ord = 'b';
    with test as (
    select 1 N, 'a' Ord from dual union all
    select 1,'b' from dual union all
    select 1,'c' from dual union all
    select 2,'a' from dual union all
    select 2,'b' from dual union all
    select 2,'d' from dual union all
    select 3,'e' from dual union all
    select 3,'f' from dual union all
    select 3,'g' from dual union all
    select 3,'h' from dual union all
    select 1,'f' from dual union all
    select 2,'f' from dual )
    select N from test tp where Ord = 'f'
    intersect
    select N from test tp where Ord = 'g'
    intersect
    select N from test tp where Ord = 'h';

  • Need Query to display

    Hi Folks,
    I need query for displaying following:
    Adjusted A/R Balance:-
    Sum of all open Receivables transactions for the Bill To address for a :Particular_Customer. Total of all open items (Invoice, Credit Memos, CLAIMS, ON ACCTS, UNAPPLIED, DEBIT MEMOS) PLUS any orders that have been approved but not yet invoiced.
    ================================================================================
    Credit Tolerance:-
    Percentage of Credit Limit that is the allowed tolerance for exceeding the credit limit. Determined by the following calculation: (Exposure Credit Limit ((Credit Tolerance + 100)* Credit Limit / 100) – Credit Limit)/Credit Limit.
    would be very greatful if someone can help on same.
    Thanks in advance.
    Regards,
    gvk.

    another example would be:
    SQL> with emp1 as
      2  (select 10 emp_id, 'AAAA' emp_name from dual
      3   union all
      4   select 22 emp_id, 'BBBB' emp_name from dual
      5   union all
      6   select 15 emp_id, 'BBBB' emp_name from dual
      7   union all
      8   select 17 emp_id, 'cccc' emp_name from dual
      9   union all
    10   select  4 emp_id, 'DDDD' emp_name from dual
    11   union all
    12   select  5 emp_id, 'EEEE' emp_name from dual
    13   union all
    14   select 53 emp_id, 'EEEE' emp_name from dual)
    15  select emp_id id, emp_name name from emp1;
            ID NAME
            10 AAAA
            22 BBBB
            15 BBBB
            17 cccc
             4 DDDD
             5 EEEE
            53 EEEE
    7 rows selected.
    SQL> with emp1 as
      2  (select 10 emp_id, 'AAAA' emp_name from dual
      3   union all
      4   select 22 emp_id, 'BBBB' emp_name from dual
      5   union all
      6   select 15 emp_id, 'BBBB' emp_name from dual
      7   union all
      8   select 17 emp_id, 'cccc' emp_name from dual
      9   union all
    10   select  4 emp_id, 'DDDD' emp_name from dual
    11   union all
    12   select  5 emp_id, 'EEEE' emp_name from dual
    13   union all
    14   select 53 emp_id, 'EEEE' emp_name from dual)
    15  select row_number() over (order by emp_name, emp_id) rn,
    16         emp_id   id,
    17         emp_name name
    18    from emp1;
            RN         ID NAME
             1         10 AAAA
             2         15 BBBB
             3         22 BBBB
             4          4 DDDD
             5          5 EEEE
             6         53 EEEE
             7         17 cccc
    7 rows selected.
    SQL>

  • Need Query for empty partitions

    I am having nearly 700 partitions for a table.Now i want to find out only the empty partitions.I need query for that.
    Thankx..

    Not the most elegant solution, but it works:
    declare
    rc number;
    str varchar2(200);
    begin
    for i in (select table_owner, table_name, partition_name from dba_tab_partitions) loop
    str := 'select count(*) from ' || i.table_owner || '.' || i.table_name || ' partition (' || i.partition_name || ')';
    execute immediate str into rc;
    if rc = 0 then
    dbms_output.put_line(i.table_owner || '.' || i.table_name);
    end if;
    end loop;
    end;

  • Need query help regarding employee retirement age.

    Need query to find employee retirement age 2years in advance.

    You can use per_all_people_f table.
    something like this :-
    SELECT PAPF.employee_number,
    PAPF.date_of_birth,
    (MONTHS_BETWEEN(SYSDATE,PAPF.date_of_birth) / 12)+2 RETIREMENT_AGE_FIGURE
    FROM per_all_people_f PAPF
    WHERE TRUNC (SYSDATE) BETWEEN PAPF.effective_Start_date AND PAPF.effective_end_date
    AND (MONTHS_BETWEEN(SYSDATE,date_of_birth) / 12)+2 >=65 /* ASSUMING 65 IS RETIREMENT AGE HERE*/
    In case if you only want to pick Employee data then use below sample query and modify according to your requirement :-
    SELECT PAPF.employee_number,
    PAPF.date_of_birth,
    ((MONTHS_BETWEEN(SYSDATE,PAPF.date_of_birth) / 12)+2) RETIREMENT_AGE_FIGURE,
    PPT.system_person_type,
    PPT.user_person_type
    FROM per_all_people_f PAPF,
    per_person_types PPT,
    per_person_type_usages_f PPTUF
    WHERE TRUNC (SYSDATE) BETWEEN PAPF.effective_Start_date AND PAPF.effective_end_date
    AND ((MONTHS_BETWEEN(SYSDATE,date_of_birth) / 12)+2) >=65
    AND PPTUF.person_id = PAPF.person_id
    AND PPT.person_type_id = PPTUF.person_type_id
    AND PPT.system_person_type = 'EMP'
    AND TRUNC (SYSDATE) BETWEEN PPTUF.effective_Start_date AND PPTUF.effective_end_date
    Edited by: VISHAL DANGI on Jul 8, 2012 10:30 PM

  • I need query to split the string

    I need query to split the input string into comma seperated triplets values.
    Input String: Database
    Output : Dat, ata,tab,aba,bas,ase

    SQL> with t
      2  as
      3  (
      4  select 'Database' str
      5    from dual
      6  )
      7  select substr(str, level, 3) str
      8    from t
      9   where length(substr(str, level, 3)) = 3
    10  connect by level <= length(str);
    STR
    Dat
    ata
    tab
    aba
    bas
    ase
    6 rows selected.
    And if you want it as a single string then..
    SQL> with t
      2  as
      3  (
      4  select 'Database' str
      5    from dual
      6  )
      7  select ltrim(sys_connect_by_path(str, ','), ',') str
      8    from (
      9            select row_number() over(order by level) rno
    10                 , substr(str, level, 3) str
    11              from t
    12             where length(substr(str, level, 3)) = 3
    13            connect by level <= length(str)
    14         )
    15   where connect_by_isleaf = 1
    16   start with rno = 1
    17  connect by rno = prior rno + 1;
    STR
    Dat,ata,tab,aba,bas,ase

  • DNS not querying/ recognizing/ resolving internal domain name using nslookup

    I've setup a virtual lab for practice purpose on VMware 8 workstation.
    I have already asked this question in vm community but still got no answers hence asking it here.
    In my vmware workstation 8, for practice lab purpose my setup is as follows:-
    1] Win 2k8R2 Enetrprise edi.vm as my DC with DNS & DHCP configured and working perfect. DNS is getting resolved internally via NSLOOKUP. Server has manual ip assigned...192.168.1.xx series.
    2] Win xp vm as my Client and getting dhcp lease address from the above DC and also the DNS is getting resolved internally via NSLOOKUP.
    Now that these two vms are communicating perfectly with each other, I thought about connecting them to my physical internet.
    So, in the Virtual network editor, I added a Host-only type network named
    VMnet 04 with Use local dhcp service checkbook Disabled and on each of these vms, in network adapter settings, selected specific virtual network and pointed it to
    VMnet 04 in both vms.
    Now, in both the vms, an additional network connection got added and hence was successfully able to browse internet from both vms.
    Now the REAL problem:--
    After the above configuration, when I do NSLOOKUP on the DC, the DNS doesnt resolves external sites on the internet.
    I havent specified any kind of conditional forwarding etc.., its a simple DNS setup.
    I want it to resolve to the internal domain and also be connected to the internet .
    What setting do I need to do in DNS or in VM network?
    I tried almost all types of settings in vm virtual network editor by specifying dns manually and so on but none worked.

    Sorry my bad.... slight mistake in my question...Here is my corercted query--
    After successfully connecting to the internet, when I do NSLOOKUP on the DC, the DNS doesnt resolve my internal domain/site but instead resolves external sites on the internet.
    My computer FQDN is nri.wwe.com
    Domain dns name is wwe.com
    The above should get resolve internally but it searches on the internet.
    This is how it should work
    & it works perfect when I disable the other NAT network adapter (i.e. disable internet connectivity on my virtual DC)
    C:\>nslookup nri.wwe.com
    Server:  nri.wwe.com
    Address:  192.168.1.11
    Name:    nri.wwe.com
    Address:  192.168.1.11
    But when I again enable internet connectivity, this it what happens.
    C:\nslookup www.wwe.com
    DNS request timed out.
        timeout was 2 seconds.
    Server:  UnKnown
    Address:  192.168.12.2
    DNS request timed out.
        timeout was 2 seconds.
    Non-authoritative answer:
    DNS request timed out.
        timeout was 2 seconds.
    Name:    www.wwe.com.nsatc.net
    Address:  64.152.0.124
    Aliases:  www.wwe.com
    And when I again nslookup, this is what I get,
    C:\>nslookup www.wwe.com
    DNS request timed out.
        timeout was 2 seconds.
    Server:  UnKnown
    Address:  192.168.12.2
    DNS request timed out.
        timeout was 2 seconds.
    DNS request timed out.
        timeout was 2 seconds.
    DNS request timed out.
        timeout was 2 seconds.
    *** Request to UnKnown timed-out
    Now this 192.168.12.2 is VM assigned DNS via VM Natting with its own DHCP. If we do it manually, none of the virtual machines can connect to the internet. So I cannot fiddle with it anymore as I have already that as well.

  • Complex query to resolve

    hi!
    any body can resolve this please
    I have two tables
    ITEM_MASTER
    ITEM NOT NULL VARCHAR2(25)
    ITEM_NUMBER_TYPE NOT NULL VARCHAR2(6)
    DEPT NOT NULL NUMBER(4)
    CLASS NOT NULL NUMBER(4)
    SUBCLASS NOT NULL NUMBER(4)
    STATUS NOT NULL VARCHAR2(1)
    ITEM_DESC NOT NULL VARCHAR2(250)
    rpm_item_zone_price
    ITEM_ZONE_PRICE_ID NOT NULL NUMBER(15)
    ITEM NOT NULL VARCHAR2(25)
    ZONE_ID NOT NULL NUMBER(10)
    STANDARD_RETAIL NOT NULL NUMBER(20,4)--price column
    which looks like this
    where zone_id for understanding
    when zone_id = 1 then 'Express'
    when zone_id = 2 then 'Superstore'
    when zone_id = 3 then 'Metro'
    and i need a query based on this condition
    Express price is greater or less than metro price, Express price less than superstores price
    How can we write a query for this can any body can give an idea ASAP please
    i don't know the o/p,give me an idea
    Edited by: [email protected] on Jun 18, 2010 12:14 AM

    Hi,
    Welcome to the forum.
    Pl. provide the following details and we will try to help you from there
    1. your DB version
    2. Table Structure and Sample records (preferably create table and insert statements)
    3. Expected output. (how your output should look like)
    And, use \ tag to put in your scripts and codes.
    like \ create table T ..... \ and it will look likecreate table T ..... Regards,
    Prazy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is there any way to query who resolved a Service Request in Service Manager?

    Hi,
    I have a query that pulls the last name of the user who resolved an Incident in Service Manager. The name is pulled from a view called "IncidentResolvedByUserFactvw." I need to pull the last name of the person who completed a Service Request. There
    is no view or table that I can find that has this info. Is there a "IncidentResolvedByUserFactvw" type view with the Service Request info? If not where is this data stored?
    Thank you for any help!

    couple of notes:
    necromancy!
    Closed -ne Completed. Completed means the work has been delivered. Closed means the work has been delivered, the client has been contacted, we've finished all of our followups and process checks, and we're ready to archive this ticket in the historical
    database. 
    it doesn't really make sense to talk about who completed a service request. a service request is a structured process. as well as who built an item that came off the assembly line; the assembly line did. who completed the services request? if your service
    requests are well designed, the overwhelming majority of requests will be completed by the system once the last activity in the process is completed. 

  • Urgent Need: Query is taking time

    Hi,
    I have a query which is taking lots of time.Please help me in this regard...
    select subscripti0_.RENTAL_ID as RENTAL1_101_0_, movieprodu1_.product_id as product1_45_1_, moviepacka2_.PACKAGE_ID as PACKAGE1_47_2_, movietitle3_.TITLE_ID as TITLE1_48_3_, subscripti0_.LOGICAL_QUEUE_POSITION as LOGICAL2_101_0_, subscripti0_.STATUS as STATUS101_0_, subscripti0_.RENT_CODE as RENT4_101_0_, subscripti0_.IS_VISIBLE_FLAG as IS5_101_0_, subscripti0_.SHIP_DATE as SHIP6_101_0_, subscripti0_.DATE_CHECK_IN as DATE7_101_0_, subscripti0_.SET_NBR as SET8_101_0_, subscripti0_.ALLOCATION_DATE as ALLOCATION9_101_0_, subscripti0_.USPS_SHIP_DATE as USPS10_101_0_, subscripti0_.CENTRAL_CHECKIN_DATE as CENTRAL11_101_0_, subscripti0_.ESTIMATED_ARRIVAL_DATE as ESTIMATED12_101_0_, subscripti0_.CREATED_BY as CREATED13_101_0_, subscripti0_.CREATED_DATE as CREATED14_101_0_, subscripti0_.UPDATED_BY as UPDATED15_101_0_, subscripti0_.UPDATED_DATE as UPDATED16_101_0_, subscripti0_.SUBSCRIPTION_ID as SUBSCRI17_101_0_, subscripti0_.MOVIE_ID as MOVIE18_101_0_, movieprodu1_.ONLINE_RELEASE_DATE as ONLINE2_45_1_, movieprodu1_.PRODUCT_TITLE as PRODUCT3_45_1_, movieprodu1_.PACKAGE_ID as PACKAGE4_45_1_, movieprodu1_1_.AVAILABILITY_BAND as AVAILABI2_46_1_, movieprodu1_1_.TOTAL_RENTABLE_INVENTORY as TOTAL3_46_1_, NVL(movieprodu1_.ONLINE_FLAG, 0) as formula0_1_, NVL(movieprodu1_.PRIMARY_PRODUCT, 0) as formula1_1_, moviepacka2_.TITLE as TITLE47_2_, moviepacka2_.dvd_release_date as dvd3_47_2_, moviepacka2_.FORMAT as FORMAT47_2_, moviepacka2_.PACKAGE_MPAA as PACKAGE5_47_ 2_, moviepacka2_.T_ARTICLE as T6_47_2_, moviepacka2_.TITLE_ID as TITLE7_47_2_, movietitle3_.TITLE as TITLE48_3_, movietitle3_.THEATRICAL_RELEASE as THEATRICAL3_48_3_, movietitle3_.TITLE_MPAA as TITLE4_48_3_, movietitle3_.LEGACY_ID as LEGACY5_48_3_, movietitle3_.AVERAGE_USER_RATING as AVERAGE6_48_3_, movietitle3_.RUNNING_TIME as RUNNING7_48_3_, movietitle3_.PRIMARY_PACKAGE_ID as PRIMARY8_48_3_, movietitle3_1_.BUY_NEW as BUY2_49_3_, movietitle3_1_.BUY_USED as BUY3_49_3_, movietitle3_1_.RENT_DOWNLOAD as RENT4_49_3_, movietitle3_1_.BUY_DOWNLOAD as BUY5_49_3_, NVL(movietitle3_.HAS_RENTABLE_PRODUCTS, 0) as formula3_3_ from SUBSCRIPTION_RENTAL subscripti0_ inner join ACTIVE_MOVIE_PRODUCT movieprodu1_ on subscripti0_.MOVIE_ID=movieprodu1_.product_id left outer join PRODUCT_AVAILABILITY movieprodu1_1_ on movieprodu1_.product_id=movieprodu1_1_.MOVIE_ID inner join ACTIVE_MOVIE_PACKAGE moviepacka2_ on movieprodu1_.PACKAGE_ID=moviepacka2_.PACKAGE_ID inner join ACTIVE_MOVIE_TITLE movietitle3_ on moviepacka2_.TITLE_ID=movietitle3_.TITLE_ID left outer join MOVIE_TITLE_ATTRIBUTES movietitle3_1_ on movietitle3_.TITLE_ID=movietitle3_1_.TITLE_ID where subscripti0_.SUBSCRIPTION_ID=:1 and subscripti0_.DATE_CHECK_IN>:2 and (subscripti0_.DATE_CHECK_IN is not null) order by subscripti0_.DATE_CHECK_IN DESC
    Explain Plan for this query:
    OPERATION OBJECT_NAME OPTIMIZER COST BYTES CARDINALITY CPU_COST IO_COST
    SELECT STATEMENT ALL_ROWS 148 1570 5 10090819 147
    SORT 148 1570 5 10090819 147
    NESTED LOOPS 147 1570 5 1237900 147
    NESTED LOOPS 142 1530 5 1191042 142
    NESTED LOOPS 141 1470 5 1174111 141
    NESTED LOOPS 129 1398 6 1073114 129
    NESTED LOOPS 117 1062 6 968996 117
    PARTITION HASH 111 732 6 911328 111
    TABLE ACCESS SUBSCRIPTION_RENTAL ANALYZED 111 732 6 911328 111
    INDEX INDX_SUB_RENTAL_SUB ANALYZED 3 10 43164 3
    TABLE ACCESS MOVIE_PRODUCT ANALYZED 1 55 1 9611 1
    INDEX PK_MOVIE_PRODUCT ANALYZED 0 1 1900 0
    TABLE ACCESS MOVIE_PACKAGE ANALYZED 2 56 1 17353 2
    INDEX PK_MOVIE_PACKAGE ANALYZED 1 1 9021 1
    TABLE ACCESS MOVIE_TITLE ANALYZED 2 61 1 16833 2
    INDEX PK_MOVIE_TITLE ANALYZED 1 1 9021 1
    TABLE ACCESS MOVIE_TITLE_ATTRIBUTES ANALYZED 1 12 1 9331 1
    INDEX PK_MOVIE_TITLE_ATTRIBUTES ANALYZED 0 1 1900 0
    TABLE ACCESS PRODUCT_AVAILABILITY ANALYZED 1 8 1 9371 1
    INDEX PRODUCT_AVAILABILITY_PK ANALYZED 0 1 1900 0
    I need the help very urgently. Kindly give me the solution immediately.
    Edited by: msora on Feb 10, 2009 3:19 AM

    msora wrote:
    Thanks Ozy,
    The query is using joins instead of subquery. The statistics are latest. the query is using indexes too.the optimzer_mode is all_rows.
    Now, you tell me what hint i should use to optimize this query?
    Thanks and Regards,
    MSORAHmm, urgent, immediately, its not Support MSORA. Be patient while asking for help or if its really urgent, open an SR with support.
    Your query is not able to be read. Format it using the { code }( without spaces) and post it. Also there is no such thing that you can just put any hint and query will be tuned. Trace your query with 10046 trace( search this forum for that) and paste its output here.
    Aman....

  • Need query or Tree

    Hi,
    I have employee table, i need to show the details of employees who are working under a manager till this it ok,but i have one more conditon is that, if the manager has any sub mangers, i need to show the employees who are working under sub mangare.
    empno ename mgrid are the main fileds in my table
    Please help me in this by providing a query or creating a tree
    thanks
    Regards,
    Rajesh

    Hi,
    Do you mean something like this -
    SQL> select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7839 KING       PRESIDENT            17-NOV-81                               10
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7788 SCOTT      ANALYST         7566 09-DEC-82       3000                    20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7876 ADAMS      CLERK           7788 12-JAN-83       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    SQL> select
      2    lpad('*', level * 2) || ename as ename
      3  from
      4    emp
      5  start with mgr is null
      6  connect by prior empno = mgr;
          ENAME
           *KING
             *BLAKE
               *ALLEN
               *WARD
               *MARTIN
               *TURNER
               *JAMES
             *CLARK
               *MILLER
             *JONES
               *SCOTT
                 *ADAMS
               *FORD
                 *SMITH
    14 rows selected.

Maybe you are looking for

  • Adobe photoshop elements 8 serial #

    I have photoshop elements 8 on my personal computer this download allowed 2 computers one computer had problems had to reinstall but i cant find serial number to do so. can it be obtained from my adobe account or from where it is on my personal compu

  • Maintaining global lists for ComboBox values

    I would like to maintain multi-lingual lists of allowable categories to be used in ComboBox controls. The values for these lists should be stored external to the application or at some global level to that they can be maintained by someone who is not

  • Troubleshooting PHP ORA-12154

    I have studied the php troubleshooting faq - I have php5+apache2 set up on what I think are two identical servers. One works, the other doesn't. Both establish ORACLE_HOME and TNS_ADMIN in the httpd script right before starting httpd. I have a test f

  • Premiere Elements 8: Splash Screen Fail

    I am running my Premiere Elements 8 on Windows 7 64 bit, latest Nvidia drivers. The splash screen where you launch the actual program loads fine and my projects open from the OPEN PROJECT menu the first time, but if I close the program and try to onc

  • Selecting two videos in one applet wothout errors?

    Hello there, I have created an applet that allows the user to swap the videos that are been displayed with radio buttons. The intention is for the radio button to remove the original video and display the other one. I end up with both of them on the