Help to query long volum in all_views

Hi Gurus,
background :
After a upgrade from 8.1.7 to 9.0.2 we found that some custom views have ',,' in them, but they are still showing in the 'VALID' status.
Problem:
In order to find all bad views I am trying to run something like
SQL/> select view_name from all_views where text like '%,,%'
but it fails with
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got LONG
I tried running some thing like
set serveroutput on size 10000
declare
cursor c_dbv is
select owner,view_name,text
from all_views ;
searchstring varchar2(100) := ',,';
begin
for ct in c_dbv loop
dbms_output.put_line(ct.text);
if instr(lower(ct.text),lower(searchstring)) > 0 then
dbms_output.put_line(ct.owner||'.'||ct.view_name);
else
dbms_output.put_line ('No match' );
end if;
end loop;
end;
it is also not helping ; could some one pleas suggest an alternative way
Regards

SQL> create or replace view my_test_view
  2  as
  3  select ',,' c from dual
  4  /
View created.
SQL> declare
  2     cursor c
  3     is
  4     select view_name,text
  5       from all_views;
  6  begin
  7     for i in c
  8     loop
  9             if instr(i.text,',,') > 0
10             then
11                     dbms_output.put_line(i.view_name);
12             end if;
13     end loop;
14  end;
15  /
MY_TEST_VIEW
PL/SQL procedure successfully completed.

Similar Messages

  • Help me query tunning

    Hi Guru's
    Can you please help me query tunning.
    Database Version : Oracle 11g - 11.2.0.3
    select  distinct  corporation_name custer_name,
            glog_util.remove_domain(SHIP_BUY.SERVPROV_GID ) SCAC,
            glog_util.remove_domain(ship_buy.shipment_gid) buy_shipment_gid,
            F_Get_SELL_ID_STRING(SHIP_BUY.SHIPMENT_GID) sell_shipment_gid,
            ship_buy.domain_name,    
            F_GET_ORDER_RELEASE_GID('B',SHIP_BUY.SHIPMENT_GID,0) ORDER_RELEASE_GID,
            f_get_refnum_string('SHIPMENT', ship_buy.shipment_gid, 'MBOL_NUMBER_CLEANSED')MBOL_NUMBER,
            F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) POD_RECEIVED_DATE,
            f_get_exp_accrue_amt(ship_buy.shipment_gid,'SHIPMENT') Total_accrual_amount    
    from shipment ship_buy,
            invoice inv,
            invoice_shipment si,
            --voucher v,
            corporation corp
    where corp.domain_name=ship_buy.domain_name
            and corp.is_domain_master='Y'
          and 1=1
          AND ship_buy.domain_name like 'UPS/CP/DFP/%'
          and F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID)  <= to_char(to_date('31-JUL-2013', 'DD-MON-YYYY'), 'dd-mon-yyyy')
            --and V.INVOICE_GID(+) = inv.invoice_gid
            --and ship_buy.domain_name = 'UPS/CP/VZNB'
            and si.shipment_gid(+) = SHIP_BUY.SHIPMENT_GID
            AND SI.INVOICE_GID = INV.INVOICE_GID(+)
            and SHIP_BUY.INSERT_DATE > '1-JAN-2007'
            and SHIP_BUY.USER_DEFINED1_ICON_GID = 'ACCEPTED'
    UNION        
    select  distinct  corporation_name custer_name,
            glog_util.remove_domain(SHIP_BUY.SERVPROV_GID ) SCAC,
            glog_util.remove_domain(ship_buy.shipment_gid) buy_shipment_gid,
            F_GET_SELL_ID_STRING( SHIP_BUY.SHIPMENT_GID) sell_shipment_gid,
            ship_buy.domain_name,    
            F_GET_ORDER_RELEASE_GID('B',SHIP_BUY.SHIPMENT_GID,0) ORDER_RELEASE_GID,
            f_get_refnum_string('SHIPMENT', ship_buy.shipment_gid, 'MBOL_NUMBER_CLEANSED')MBOL_NUMBER,
            F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) POD_RECEIVED_DATE,
            f_get_exp_accrue_amt(inv.invoice_gid,'INVOICE') Total_accrual_amount  
    from shipment ship_buy,
            invoice inv,
            invoice_shipment si,
          -- voucher v,
            corporation corp
    where corp.domain_name=ship_buy.domain_name
            and corp.is_domain_master='Y'
            and 1=1
            AND ship_buy.domain_name like 'UPS/CP/DFP/%'
            and F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID)  <= to_char(to_date('31-JUL-2013', 'DD-MON-YYYY'), 'dd-mon-yyyy')
          --AND INV.DOMAIN_NAME = 'UPS/CP/VZNB'
          --and V.INVOICE_GID(+) = inv.invoice_gid
            and si.shipment_gid(+) = SHIP_BUY.SHIPMENT_GID
            AND SI.INVOICE_GID = INV.INVOICE_GID(+)
            and SHIP_BUY.INSERT_DATE > '1-JAN-2007'
            and INV.USER_DEFINED1_ICON_GID = 'ACCEPTED'
    GROUP BY corporation_name,SHIP_BUY.SHIPMENT_GID,SHIP_BUY.SERVPROV_GID,ship_buy.domain_name,inv.invoice_gid
    ORDER BY CUSTER_NAME, BUY_SHIPMENT_GID;
    And I generated the execution plan :
    | Id  | Operation                          | Name                    | Rows  | Bytes | Cost (%CPU)| Time    |
    |  0 | SELECT STATEMENT                  |                        |    3 |  448 |  415  (2)| 00:00:05 |
    |  1 |  SORT UNIQUE                      |                        |    3 |  448 |  414  (87)| 00:00:05 |
    |  2 |  UNION-ALL                        |                        |      |      |            |          |
    |  3 |    NESTED LOOPS OUTER              |                        |    3 |  384 |    57  (0)| 00:00:01 |
    |*  4 |    HASH JOIN                      |                        |    3 |  294 |    54  (0)| 00:00:01 |
    |*  5 |      TABLE ACCESS BY INDEX ROWID  | SHIPMENT                |    3 |  195 |    40  (0)| 00:00:01 |
    |*  6 |      INDEX SKIP SCAN              | IND_SHIP_DOM_ICON      |    54 |      |    25  (0)| 00:00:01 |
    |*  7 |      TABLE ACCESS FULL            | CORPORATION            |    4 |  132 |    14  (0)| 00:00:01 |
    |*  8 |    INDEX RANGE SCAN              | IND_INVOICESHIP_SHP_GID |    1 |    30 |    1  (0)| 00:00:01 |
    |  9 |    HASH GROUP BY                  |                        |    1 |  192 |  356  (1)| 00:00:05 |
    |* 10 |    HASH JOIN                      |                        |    1 |  192 |  354  (1)| 00:00:05 |
    |  11 |      NESTED LOOPS                  |                        |      |      |            |          |
    |  12 |      NESTED LOOPS                |                        |    1 |  159 |  339  (0)| 00:00:05 |
    |  13 |        NESTED LOOPS                |                        |  145 | 13920 |  194  (0)| 00:00:03 |
    |  14 |        TABLE ACCESS BY INDEX ROWID| INVOICE                |  145 |  5220 |    49  (0)| 00:00:01 |
    |* 15 |          INDEX SKIP SCAN          | IDX_INV_TYP_ICON_NAM    |  145 |      |    17  (0)| 00:00:01 |
    |* 16 |        INDEX RANGE SCAN          | UK_INVOICE_SHIPMENT    |    1 |    60 |    1  (0)| 00:00:01 |
    |* 17 |        INDEX UNIQUE SCAN          | PK_SHIPMENT            |    1 |      |    1  (0)| 00:00:01 |
    |* 18 |      TABLE ACCESS BY INDEX ROWID  | SHIPMENT                |    1 |    63 |    1  (0)| 00:00:01 |
    |* 19 |      TABLE ACCESS FULL            | CORPORATION            |    4 |  132 |    14  (0)| 00:00:01 |
    Predicate Information (identified by operation id):
      4 - access("CORP"."DOMAIN_NAME"="SHIP_BUY"."DOMAIN_NAME")
      5 - filter("F_GET_POD_RECEIVED_DATE"("SHIP_BUY"."SHIPMENT_GID")<=TO_DATE(' 2013-07-31 00:00:00',
                  'syyyy-mm-dd hh24:mi:ss') AND "SHIP_BUY"."INSERT_DATE">TO_DATE(' 2007-01-01 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss'))
      6 - access("SHIP_BUY"."USER_DEFINED1_ICON_GID"='ACCEPTED' AND "SHIP_BUY"."DOMAIN_NAME" LIKE
                  'UPS/CP/DFP/%')
          filter("SHIP_BUY"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%' AND
                  "SHIP_BUY"."USER_DEFINED1_ICON_GID"='ACCEPTED')
      7 - filter("CORP"."IS_DOMAIN_MASTER"='Y' AND "CORP"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%')
      8 - access("SI"."SHIPMENT_GID"(+)="SHIP_BUY"."SHIPMENT_GID")
      10 - access("CORP"."DOMAIN_NAME"="SHIP_BUY"."DOMAIN_NAME")
      15 - access("INV"."USER_DEFINED1_ICON_GID"='ACCEPTED')
          filter("INV"."USER_DEFINED1_ICON_GID"='ACCEPTED')
      16 - access("SI"."INVOICE_GID"="INV"."INVOICE_GID")
      17 - access("SI"."SHIPMENT_GID"="SHIP_BUY"."SHIPMENT_GID")
          filter("F_GET_POD_RECEIVED_DATE"("SHIP_BUY"."SHIPMENT_GID")<=TO_DATE(' 2013-07-31 00:00:00',
                  'syyyy-mm-dd hh24:mi:ss'))
      18 - filter("SHIP_BUY"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%' AND "SHIP_BUY"."INSERT_DATE">TO_DATE('
                  2007-01-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      19 - filter("CORP"."IS_DOMAIN_MASTER"='Y' AND "CORP"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%')
    Statistics
        246247  recursive calls
              2  db block gets
        1660067  consistent gets
          13839  physical reads
              0  redo size
        592054  bytes sent via SQL*Net to client
          6024  bytes received via SQL*Net from client
            502  SQL*Net roundtrips to/from client
          15296  sorts (memory)
              0  sorts (disk)
          7513  rows processed

    Hmmm...why does this look familiar?
    F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID)  <= to_char(to_date('31-JUL-2013', 'DD-MON-YYYY'), 'dd-mon-yyyy')
    SHIP_BUY.INSERT_DATE > '1-JAN-2007'
    Like I said in your other thread about this, these two lines need to be fixed and your function needs to be fixed so the return statement doesn't do an implicit date conversion.
    Can't you see what that first line is doing?  You're taking a character string, turning it into a date, then back to a character string.
    If nothing else, these lines should be...
    F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID)  <= to_date('31-JUL-2013', 'DD-MON-YYYY')
    SHIP_BUY.INSERT_DATE > to_date('01-JAN-2007','DD-MON-YYYY')
    (assuming insert_date is a proper date format, fingers crossed)

  • Need Help to query Lync Database for User Information

    Need Help to Query the lync database to retrieve below user information.
    1. SIP Address of the registered user
            2. Phone Number configured to the particular account.
            3. IP Address
           4. Last Logged in time.
    I am trying to pull the above information from rtc database for all the registered users. Please let me know if this is possible and it would be great if you can throw some light on what tables to look for the data. Thank You.

    Hi,
    For SIP address and Phone number you can check RTC database.
    IP Address:
    You can refer to the link below to query IP address: 
    http://h30499.www3.hp.com/t5/Business-Service-Management-BAC/Monitoring-Lync-with-the-User-Registrations-Viewer-Free-NMC-tool/ba-p/5961497#.UtOU43mIrwo
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
    Last Logged in time:
    You can refer to the link below:
    http://blogs.technet.com/b/dodeitte/archive/2011/05/11/how-to-get-the-last-time-a-user-registered-with-a-front-end.aspx
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Help sending out long email message from ORACLE PL/SQL

    Hello,
    I need help sending out long email message from ORACLE PL/SQL.
    My message(email body) contains about 4000 characters and comes out truncated somewhere on the middle.
    My business requirements do not allow me to send it as attachment.
    I am using oracle utl_smtp package and on oracle 10gR2.
    Is it possible to send out long text message from Oracle?
    Thanks!
    Ia

    Thank you very much for your responses.
    Even if I use email procedure below my message is getting truncated.
    Here is how I am trying to execute the procedure from sql plus:
    DECLARE
    P_SENDER VARCHAR2(32767);
    P_RECIPIENT VARCHAR2(32767);
    P_SUBJECT VARCHAR2(32767);
    P_BODY VARCHAR2(32767);
    BEGIN
    P_SENDER := 'xxxx@yyy';
    P_RECIPIENT := 'xxxx@yyy';
    P_SUBJECT := 'long text message';
    P_BODY :=
    '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    7 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    8 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    9 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    10 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    11 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    12 34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    21 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789';
    EMAIL ( P_SENDER, P_RECIPIENT, P_SUBJECT, P_BODY );
    COMMIT;
    END;
    SQL> @long_sp;
    PL/SQL procedure successfully completed.
    The email message is:
    long text message
    xxx@yyyy
    Sent:     Tuesday, May 25, 2010 6:52 AM
    To:     
    xxx@yyyy
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 7 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 8 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 9 12345678901234567890123456789012345678901234567890123456789012345678901234
    Message is getting truncated around 1000 characters.
    What am I doing wrong?
    Please help!
    Thanks!!

  • HT4623 i am having a problem with my iphone 4s. it is not displaying its volume bar in music or anywhere when not connected to earphones. kindly help me with its volume settings.

    i am having a problem with my iphone 4s. it is not displaying its volume bar in music or anywhere when not connected to earphones. kindly help me with its volume settings.

    Have you tried the restart/reset/restore troubleshooting path?  That would be the best initial set of steps to take, particularly in a situation like this.  

  • All help menus no longer work after installing Mavericks

    After installing Mavericks on my iMac all help menus no longer work. You still get the drop down box which contains the search window and other choices, but if you try clicking on them the screen just flashes or you might get a box that says " safari help is not available". It does this system wide, doesn't matter what application your in. My internet works fine but for some reason in Mavericks the help menus are not accessing this information. Anyone else have this problem? Or an answer?
    Thank you!

    Finally, a quick restart of the mac and all help menus are working again.

  • Help Please! My volume has disappeared when I play music on my iPhone 4s (since I updated to iOS6). Help please!?

    Help Please! My volume has disappeared when I play music on my iPhone 4s (since I updated to iOS6). Help please!?

    Basic troubleshooting steps clearly outlined in the User Guide are restart, reset, restore from backup, restore as new device.
    Have you tried ALL the troubleshooting steps?  If you have and you're still having problems, then you'll need to bring your phone into Apple for evaluation and possible exchange.

  • Help in solving long run query

    Hi All,
    I have a situation where the job runs fine until yesterday with the same code and today it is running for 20hours which used to take 30mins.
    i checked all the database tuning parameter like, buffer hit ratio, chache hit ratio.......all those this and everthing is fine and the imp thing is it is production database.
    and i check the executon plan it is doing full table scan and the full table scan for the same table for other query is taking less time.
    Colud any one help in this issue. and also there are indexex build and it is already in production since 1 year and runs fine every month as it is monthly job.
    here is the version details:
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE     11.1.0.6.0     Production
    TNS for Solaris: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    Thanks In advance

    /SQL STATEMENT/ ---creating table as selecting data from 2 tables in that one from different database via dblink:
    CREATE TABLE LPRDCBR.CBR1_AEDW_WEST_CUST_PROF_LB
    NOLOGGING
    AS
    SELECT bill_cycle_date,
    can,
    ROUND (SUM (dom_mou), 2) dom_mou,
    ROUND (SUM (intl_mou), 2) intl_mou
    FROM ( SELECT bill_cycle_date,
    g4_cust_acct_no can,
    -- g4_cust_acct_no can ,
    SUM (g4_billable_secs / 60) DOM_MOU,
    SUM (0) INTL_MOU
    FROM lprdcbs.lb_usage_info PARTITION (lb_usage_info_0611)
    WHERE --bill_cycle_date  = '04-may-2010' and
    NVL (G4_TO_STATE, 'XX') IN
    (SELECT state_cd
    FROM lprdcbs.int1_dim_staTE@oramsas) --and
    --g4_cust_acct_no in  ('3936276210',  '3971245431','3967253114','3901296786','3927264229','3981289110','3970280982')
    --and g4_cust_acct_no = '3981289110'
    GROUP BY bill_cycle_date, g4_cust_acct_no
    UNION ALL
    SELECT bill_cycle_date,
    g4_cust_acct_no btn,
    -- g4_cust_acct_no can ,
    SUM (0) DOM_MOU,
    SUM (g4_billable_secs / 60) INTL_MOU
    FROM lprdcbs.lb_usage_info PARTITION (lb_usage_info_0611)
    WHERE --bill_cycle_date  = '04-may-2010' and
    NVL (G4_TO_STATE, 'XX') NOT IN
    (SELECT state_cd
    FROM lprdcbs.int1_dim_staTE@oramsas) --and
    --g4_cust_acct_no in  ('3936276210',  '3971245431','3967253114','3901296786','3927264229','3981289110','3970280982')
    --and g4_cust_acct_no = '3981289110'
    GROUP BY bill_cycle_date, g4_cust_acct_no)
    GROUP BY bill_cycle_date, can
    VERSION OF DB:
    TNS for Solaris: Version 11.1.0.6.0 - Production
    These are the parameters relevant to the optimizer:
    SQL> show parameter optimizer;
    NAME TYPE VALUE
    optimizer_capture_sql_plan_baselines boolean FALSE
    optimizer_dynamic_sampling integer 2
    optimizer_features_enable string 11.1.0.6
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_mode string ALL_ROWS
    optimizer_secure_view_merging boolean TRUE
    optimizer_use_invisible_indexes boolean FALSE
    optimizer_use_pending_statistics boolean FALSE
    optimizer_use_sql_plan_baselines boolean TRUE
    SQL> show parameter db_file_multi
    NAME TYPE VALUE
    db_file_multiblock_read_count integer 64
    SQL> show parameter db_block_size
    NAME TYPE VALUE
    db_block_size integer 16384
    SQL> show parameter cursor_sharing
    NAME TYPE VALUE
    cursor_sharing string EXACT
    SQL> select sname, pname, pval1,pval2 from sys.aux_stats$;
    SNAME PNAME PVAL1 PVAL2
    SYSSTATS_INFO STATUS COMPLETED
    SYSSTATS_INFO DSTART 01-30-2010 19:44
    SYSSTATS_INFO DSTOP 01-30-2010 19:44
    SYSSTATS_INFO FLAGS 1
    SYSSTATS_MAIN CPUSPEEDNW 324.565895
    SYSSTATS_MAIN IOSEEKTIM 10
    SYSSTATS_MAIN IOTFRSPEED 4096
    SYSSTATS_MAIN SREADTIM
    SYSSTATS_MAIN MREADTIM
    SYSSTATS_MAIN CPUSPEED
    SYSSTATS_MAIN MBRC
    SNAME PNAME PVAL1 PVAL2
    SYSSTATS_MAIN MAXTHR
    SYSSTATS_MAIN SLAVETHR
    13 rows selected.
    PLAN_TABLE_OUTPUT
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Pstart| Pstop | Inst |IN-OUT|
    | 0 | SELECT STATEMENT | | 2 | 84 | 7 (43)| | | | |
    | 1 | HASH GROUP BY | | 2 | 84 | 7 (43)| | | | |
    | 2 | VIEW | | 2 | 84 | 6 (34)| | | | |
    | 3 | UNION-ALL | | | | | | | | |
    | 4 | HASH GROUP BY | | 1 | 36 | 3 (34)| | | | |
    | 5 | NESTED LOOPS | | 1 | 36 | 2 (0)| | | | |
    | 6 | PARTITION RANGE SINGLE | | 1 | 33 | 2 (0)| 17 | 17 | | |
    | 7 | PARTITION HASH ALL | | 1 | 33 | 2 (0)| 1 | 11 | | |
    | 8 | TABLE ACCESS FULL | LB_USAGE_INFO | 1 | 33 | 2 (0)| 177 | 187 | | |
    | 9 | REMOTE | INT1_DIM_STATE | 1 | 3 | 0 (0)| | | ORAMS~ | R->S |
    | 10 | HASH GROUP BY | | 1 | 36 | 3 (34)| | | | |
    | 11 | FILTER | | | | | | | | |
    | 12 | NESTED LOOPS ANTI SNA | | 1 | 36 | 2 (0)| | | | |
    | 13 | PARTITION RANGE SINGLE| | 1 | 33 | 2 (0)| 17 | 17 | | |
    | 14 | PARTITION HASH ALL | | 1 | 33 | 2 (0)| 1 | 11 | | |
    | 15 | TABLE ACCESS FULL | LB_USAGE_INFO | 1 | 33 | 2 (0)| 177 | 187 | | |
    | 16 | REMOTE | INT1_DIM_STATE | 60 | 180 | 0 (0)| | | ORAMS~ | R->S |
    | 17 | FILTER | | | | | | | | |
    | 18 | REMOTE | INT1_DIM_STATE | 60 | 360 | 1 (0)| | | ORAMS~ | R->S |
    Remote SQL Information (identified by operation id):
    9 - SELECT "STATE_CD" FROM "LPRDCBS"."INT1_DIM_STATE" "INT1_DIM_STATE" WHERE "STATE_CD"=:1 (accessing
    'ORAMSAS' )
    16 - SELECT "STATE_CD" FROM "LPRDCBS"."INT1_DIM_STATE" "INT1_DIM_STATE" WHERE "STATE_CD"=:1 (accessing
    'ORAMSAS' )
    18 - SELECT "STATE_CD" FROM "LPRDCBS"."INT1_DIM_STATE" "INT1_DIM_STATE" (accessing 'ORAMSAS' )
    I CANT GIVE THE SQL*TRACE OUTPUT AS THAT QUERY IS STILL RUNNING SINCE 15HRS
    when i see the status in toad, it is now in
    TABLE ACCESS FULL | LB_USAGE_INFO---for the 2nd time
    and i am also running estimate staticstics 10% since 12hours and it is still running.
    Please advise.
    Thanks

  • F4 Help is taking long time

    Hi All,
    We are working on BI 7.0. version
    In the varaible pop-up screen we have two info objects.
    1. Fiscal year Period
    2. JOA(Joint operating aggriment)
    If u press F4 for JOA, it is taking long time to execute and finally the application is getting closed.same situation is there in RSRT also.
    If i enter with out JOA the query is giving the output. Here i have to restrict the query by JOA.
    i have changed the JOA peroperties in query designer.
    Query execution for filter value selection = Values in master data table.......
    but still the situation is the same.......
    Could you please suggest any solution for this.....
    Thanks & Regards,
    PK

    Hi Kamal,
    You can set that at the query level in the query designer for each query.
    1. Select the corresponding characteristic in the query designer.
    2. Goto to the "Extended tab" in the properties
    3. Select the "Values in the Master data table" in the "Query execution in the filter value selection.
    Also see some recomendations:
    Note 748623 - Input help (F4) has a very long runtime - recommendations
    Hope this helps.
    CK

  • Is there any "mechanical" helper to get my volume levels the same?

    I create playlists from ratings,(and comments),- and albums have different volume levels. As I always use my ipod to go to sleep, it is very destructive, to not be able to hear my music one minute, and then have it much too loud the next.
    Is there ANYTHING, free or chargeable, physical or software, that can help me get my itunes library to all the same volume level. My problem is agrivated by the fact that I do have some shared downloads, and also someone put my vynils onto cd for me, but at a lower volume.
    I might add, that I'm still a learner on the computer. I have been told to change the soundcheck -playback -preferences -itunes. I have tried it, ticked and unticked - it doesn't make any difference.
    I'd be very gratefull for some advice. Please HELP, this has been going on for ages. Thank you, in anticipation.

    I'm SO very grateful for your help! Have downloaded it, and have started to use it, but havn't listened to results yet.(just about to) THANKYOU SO MUCH.
    Thankyou so much again, this could be the end of a long (negative) era!
    A bit later: have listened to a little, seems a huge amount better. will update when used properley.
    I'm anticipating some being way out. Though it says it can overcome old changed volume levels, is it best in your opinion, to put them back to original setting?
    Many Best Wishes Vonnie

  • InfoSet Query - Long Description while selecting variable values

    Dear Experts,
    We have an InfoSet Query on different InfoObjects like 0CUSTOMER, 0CUST_COMPC etc and the common link between these InfoObjects is CUSTOMER.
    We have a variable created on this CUSTOMER. The requirement is that when this query is executed, user should be able to select a value of Customer (F4 help) and at that time, he should be able to view both Key and Long Text of Customer.
    We know that if we change the CUSTOMER InfoObject --> BEx Properties tab, then we can display Long Text and Key in Query Selection Screens. However we can not do that because it would affect all queries in which this InfoObject is used.
    If we go to Query Design, and choose "Long Text and Key" in properties of Customer, then system displays Long Text and Key of Customer but after the report execution is done.
    We want to display the Long Text of Customer to User at the time of selection and that too without making any InfoObject level change.
    If it was InfoProvider, we could have done it using "Provider specific properties of Characteristic" option. But this is InfoSet and that option does not appear here.
    Please suggest the solution.
    Regards
    P

    Rohit,
    Are you looking to display long text for infoobject instead of short description ?
    Then go tp rsd1>infoobject>display/change-->master data/texts -->text table properties -->check long text exists.
    It supports a long text field with a length of 60 characters
    Activate the infoobject
    --Doodle
    Message was edited by: Doodle

  • Help on querying data that contains special characters (#, &, @).

    Hi there,
    I am using forms 6i to query on a table whose primary key starts with a # (pound or hash sign). If I do the query trough sqlplus it comes back fine, but if I do trough forms 6i it gives me the following error messages: FRM-40831: Value too long for the field and then ORA-00920: Invalid relation operator.
    Well I have followed the instructions on the note 1007499.6 published by metalink. They explaind that when in insert the # into a field forms is thinking that you are actually going to insert a relation operator like WHERE, BETWEEN and etc. So query that is run is somewhere like this:
    select rowid
    from emp
    where (dname research)
    In that case dname would be the field that start with the #.
    They recommend as a workaround to write a pre-query trigger on the detail block to substr the # and add it the # againg with substr of the rest of characters, on note 1064159.6 by metalink.
    I have written one with no success, the trigger seems to never be fired the errors fire first.
    Can anyone help with that one ???
    Thanks
    gleisson silva

    Try below in the pre-query, would also need a none DB block and variable :blocka.keyv:
    IF substr(:dname,1,1) IN ('#','&','@')
    THEN
    :blocka.keyv:= substr(:dname,1,1)||:dname;
    :dname:=NULL;
    Set_block_property('tablename',DEFAULT_WHERE,'dname=:blocka.keyv');
    ELSE
    Set_block_property('tablename',DEFAULT_WHERE,'');
    END IF;

  • Need help in query to have all items in sap with PO data on order, date

    Hello Everyone,
    I need some help in writing a query to show all items in sap db to have itemcode, itemname, onhand, sellable(onhand-committed), on order, and the delivery date when that time should be received.  I need to know what items are regular items, which ones are master and components.  For the master I need to have the deliver date of the PO for the component.
    I have written this.
    SELECT DISTINCT TOP (100) PERCENT T1.ItemCode, SUM(T1.Sellable) AS Sellable, T1.OnOrder, MAX(T1.Docduedate) AS DeliveryDate, T1.WhsCode
    FROM         (SELECT     ItemCode, Sellable, OnOrder, '1/1/1900' AS Docduedate, WhsCode
                           FROM          dbo.V_RAZ_StoreInv
                           UNION ALL
                           SELECT     TOP (100) PERCENT ItemCode, '0' AS Sellable, Quantity AS Onorder, DocDueDate, WhsCode
                           FROM         dbo.V_RAZ_OPENPOSDATA
                           ORDER BY ItemCode) AS T1 LEFT OUTER JOIN
                          dbo.V_RAZ_ItemInfo ON T1.ItemCode = dbo.V_RAZ_ItemInfo.ItemCode
    GROUP BY T1.ItemCode, T1.OnOrder, T1.WhsCode, dbo.V_RAZ_ItemInfo.OnHold
    HAVING      (dbo.V_RAZ_ItemInfo.OnHold = 'n')
    ORDER BY T1.ItemCode, T1.WhsCode
    and for the v_raz_openposdata I have the following query
    SELECT     dbo.OPOR.DocNum, dbo.OPOR.DocStatus, dbo.POR1.WhsCode, dbo.POR1.ItemCode, dbo.POR1.Dscription, dbo.POR1.Quantity, dbo.POR1.OpenQty,
                          dbo.POR1.LineStatus, dbo.OPOR.DocDueDate
    FROM         dbo.OPOR LEFT OUTER JOIN
                          dbo.POR1 ON dbo.OPOR.DocEntry = dbo.POR1.DocEntry
    WHERE     (dbo.OPOR.DocStatus = 'O')
    Any help is greatly appreciated. 
    Right now I do get the delivery date for regular items and components but the master sku for the component all of them have 1/1/1900. 
    Thank you

    Thank you for replying Gordon.  I did not remember I had asked this before.  I no longer have access to the other account. 
    What I need on the query is that I want  a list of items with the on order quantity and when we are expecting this order to be received.  The receiving date is based on the PO delivery date.  The trick here is that  I need to Master sku to show the delivery date of the component sku.  In my scenario all components have the same delivery date for the Master sku.  If there are mulitple delivery dates because each warehouse is getting them on a different date then I want to get the delivery date for that warehouse.
    Let me know if this is possible and if yes please guide towards a query for it.
    Thank you.

  • Query text column of all_views table

    Hi Gurus,
    background :
    After a upgrade from 8.1.7 to 9.0.2 we found that some custom views have ',,' in them, but they are still showing in the 'VALID' status.
    Problem:
    In order to find all bad views I am trying to run something like
    SQL/> select view_name from all_views where text like '%,,%'
    but it fails with
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got LONG
    I tried running some thing like
    set serveroutput on size 10000
    declare
    cursor c_dbv is
    select owner,view_name,text
    from all_views ;
    searchstring varchar2(100) := ',,';
    begin
    for ct in c_dbv loop
    dbms_output.put_line(ct.text);
    if instr(lower(ct.text),lower(searchstring)) > 0 then
    dbms_output.put_line(ct.owner||'.'||ct.view_name);
    else
    dbms_output.put_line ('No match' );
    end if;
    end loop;
    end;
    it is also not helping ; could some one pleas suggest an alternative way
    Regards

    Amar,
    I've something to say now.
    Please do not post any duplicate thread here - if it has already answered by our members.
    If you lost that post then -> either you should search your post by name or else mention that you have already posted but somehow you are unable to find out the last status of your post.
    If you find you have a solution posted by some members then you don't have to wait any more - thus continue with your work.
    Otherwise, this will be considered as offense. Not only you ignore the previous post  - also you are ignoring the job done by our volunteers in order to solve your problem. More or less their effort are all in vain.
    So, my suggestion is -> Either navigate through the Pages given in the bottom of the main page in SQL Forum or find your already posted thread by search utility available here.
    Do, not post the same thread twice. This won't give you any special advantage over other post. Maximum, you won't get any reply from our members next time.
    I hope - you do remember these in future while posting the same thread ( Except posted more than once due to technical fault ).
    Regards.
    Satyaki De.
    Edited by: Satyaki_De on Nov 12, 2008 5:06 PM

  • Help with query to do with aggregating for MIN(DATE)

    Say i have the following table of data:
    Table: TEST               
    ID     TDATE     CLIENT     VAL
    1A     1/10/2005     client1     10
    2A     2/10/2005     client1     30
    3A     3/11/2005     client2     22
    4A     5/10/2005     client2     43
    5A     5/10/2005     client2     3
    6A     6/10/2005     client3     5
    7A     7/10/2005     client3     76
    I want to create a query that will retrieve a distinct list of the CLIENT column (ie. in the above table I want only 3 records retrieved in the query as there are only 3 clients) and the corresponding ID and VAL for the client record with the MIN(DATE). In the case where 2 dates are the same, I dont care which record is selected as long as the ID and VAL columns belong to the same record.
    For example in the above data I would expect the following returned in the query:
    ID     CLIENT     VAL
    1A     client1     10
    4A     client2     43 <- this record could also be 5A, client2, 3
    6A     client3     5
    Please help.

    Hi Joshua,
    You didn't post your Oracle version but I hope it supports analytic functions.
    Try as follows:
    SQL> select id,
      2         tdate,
      3         client,
      4         val
      5    from (select t.*,
      6                 row_number() over
      7                   (partition by client order by tdate) rn
      8            from test t)
      9   where rn = 1;
    ID         TDATE      CLIENT                                VAL
    1A         01/10/2005 client1                                10
    4A         05/10/2005 client2                                43
    6A         06/10/2005 client3                                 5Regards.

Maybe you are looking for