Multiple selection in Query filter

Hello,
We have a requirement wherein in the Search Master Agreements and Agreements Query, we need to search on the Collaborators on a particular MA.
We have duplicated the OOB query and have been able to acheive this, so this post is not regarding that.
The problem is Business wants to see all those MA and SA wherein the Collaborators are User A and User B.
System only allows one user to be selected at a time. Can we build the filter in any way which allows for the user running the report to select more than one user?
I have seen this behavior in another OOB query in the Auctions module. This one is  Search contacts by category name and supplier name.
Any pointers will be appreciated.
Thank you
Vikram Shukla

Hi,
I was reading:
http://www.oracle.com/technetwork/developer-tools/jdev/jdev-11gr2-nf-404365.html#bugs_fixed_in_11.1.2.2.0
Bugs Fixed in 11.1.2.2.0
Bug.No. 13508184
unsupported model type error thrown for multi select view criteria
I have tested the use case described in this thread with JDeveloper 11.1.2.2.0 but I still get the same error.
when I use operator "Does not equal":
Error: Unsupported model type.
SelectMany does not support a model of type class java.lang.Integer.
Is there anybody who can tell me more about this bug fix?
Thanks,
Kees.

Similar Messages

  • Multiple exclusion of query filter values

    Hello,
    We are trying to find a way to do a multiple selection of non consecutive values (codes) to be excluded for further navigation, but either in Excel or Web reports it is only possible to do selections for exclusion one by one and when there are many non consecutive values, it is very time consuming and subject to errors.
    Example: for listing customers that buy Material 1 but don´t buy Material 2, filter value 2 for Material, display all customers, then perform an exclusion of all the customers displayed, could be many, then the need of the multiple exclusion, and then do a Material selection for Material 1.
    We appreciate any help on this subject.
    Regards
    Gustavo Sanson

    Hi Gustavo,
    I think you can use precalculated value sets for this.
    I would leverage your example.
    You would have a base query 'X' which displays all customers for which material2 ws sold foar a certain period.
    This report will run in the background and fill the variable which is of precalculated value set type.
    For this you will have to use broadcasting.
    Create a broadcast setting for this base query X, name it customers for material 2.
    Configure the broadcast setting to refer to characteristic customer for getting the multiple values.
    Create a variable for customers in your actual quey and select its type as precalulated variable set.
    Now when you run the actual query, you will see the variable in the variable popup and if you choose F4 value help, you will see your braodcast setting name, which is actually the precalculated value set.
    Use the operator to exclude.
    One advantage with precalculated value set is , you can dynamically generate this list of multiple values at run time and for every period. You can schedule the broadcast setting to calculate the value set at whatever frequency you desire.
    Check the link below for more explanation on precalculated value set.
    http://help.sap.com/saphelp_nw70/helpdata/EN/c9/1a9341d38aa209e10000000a155106/frameset.htm
    Regards,
    Sunmit.

  • Multiple selection in Query Panel. Operator Does not equal generates error.

    Hi,
    I'm using Jdeveloper 11.1.1.4 and creating Oracle Fusion Web Application with ADF Business Components.
    I want to use multiple selection on LOV in ADF Query Panel with Table, but I get the following error
    when I use operator "Does not equal":
    Error: Unsupported model type.
    SelectMany does not support a model of type class java.lang.Integer.
    A simple example:
    Schema: HR
    Generate default Business Components for tables Departments and Employees.
    Model:
    Create List of Values for EmployeesView(DepartmentId)
    List Data Source: DepartmentsView1
    List Attribute: DepartmentId
    Display Attributes: DepartmentName (UI Hints)
    Create View Criteria EmployeesByDepartmentVC for EmployeesView
    Criteria Item:
    Attribute: DepartmentId
    Operator: Equals
    Operand: Literal
    Select "Support Multiple Value Selection" (UI Hints)
    ViewController:
    Create blank JSF Page: showEmployees.jspx
    Drag EmployeesByDepartmentVC from Data Controls to showEmployees.jspx
    Create Query=>ADF Query Panel with Table
    Run application.
    Press Advanced button.
    Select operator "Does not equal" and department names "Administration;Marketing"
    Press Search
    Error: Unsupported model type.
    SelectMany does not support a model of type class java.lang.Integer.
    Note: it works fine with operator "Equals"
    Best,
    Kees.

    Hi,
    I was reading:
    http://www.oracle.com/technetwork/developer-tools/jdev/jdev-11gr2-nf-404365.html#bugs_fixed_in_11.1.2.2.0
    Bugs Fixed in 11.1.2.2.0
    Bug.No. 13508184
    unsupported model type error thrown for multi select view criteria
    I have tested the use case described in this thread with JDeveloper 11.1.2.2.0 but I still get the same error.
    when I use operator "Does not equal":
    Error: Unsupported model type.
    SelectMany does not support a model of type class java.lang.Integer.
    Is there anybody who can tell me more about this bug fix?
    Thanks,
    Kees.

  • BW Tree Hierarchy-multiple selection for query possible?

    Hello,
    I have a question in regards to BW Tree Hierarchies and its usage in Bex Reporting:
    Is it possible to select multible Tree Hierarchy (based on the same characteristic) when executing a query in Bex Analyzer. If yes, how?
    I tried to configure this by making use of a hierarchy variable on the characteristics, but it does only allow me to select one hierarchy.
    Thanks for your help,
    Elisabeth

    Elisabeth,
    Your query can only assign one hierarchy per characteristic.
    If you need multiple ones - I'd suggest you make a query per hierarchy and you can user Query Views in the WAD to let the user select the View (i.e.. the Hierarchy) they wise.
    Regards
    Gill

  • Query filter selection list flat file

    I know that when using a "multiple single value" variable a user can paste or upload a text file of values BUT...
    is it possible to use a text file to create a query FILTER value list?
    (I mean in the query designer not at query run-time or in a workbook)
    thanks

    oh i just now see that with BI 7.0 you can right click on the right side of a filter selection and choose "Upload Selection"

  • Multiple Select List looping thru PL/SQL function body returning SQL query

    Hi,
    I have a Multiple Select List. I want to loop through the values from the Select List and process them in a PL/SQL function body returning a SQL query. Currently, my code only returns the SQL SELECT results of one item in the select list. How do I change my code to make it return the results of all of the items in the select list? (I tested it and it is definitely picking up all the values in the select list).
    <b>
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s   VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
      FOR i in 1..selected_items.count LOOP
      s := TO_CHAR(selected_items(i));
    -- htp.p('First: '||s);
    -- htp.p('Second: '||:s);
    -- htp.p('Third: '||TO_CHAR(selected_items(i)));
      q:= 'SELECT  '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
      RETURN q;
      END LOOP;
    END;</b>
    Thank you,
    Laura

    Laura,
    First, I would be careful of introducing SQL Injection possibilities. Any time I see
    'Select ... ' || :P123_FOO || ' ... '
    I worry about sql injection. In your case you are converting :P50_SELECTED_INSTRUMENTS into selected_items and then selected_items into s. So when I see
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    I think, "I could use sql Injection and hack this."
    So, I would do some validation on :P50_SELECTED_INSTRUMENTS or some other method to avoid this.
    I'm not certain I understand your query. Do you really intend to allow the user to select the beginning of a string and then find all rows that start with that string? Or, do you just want to let them find when it matches the string. This is one way if you want to do matching:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(32767);
    q varchar2(32767);
    BEGIN
    -- Change the : separate string to be comma separated with quoted strings
    s := '''' || replace(:P50_SELECTED_INSTRUMENTS, ',', ''',''')|| '''' ;
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) in (' || s ||' ) '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    If you want to do something more like you originally stated, try this:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE 1=1 ';
    FOR i in 1..selected_items.count LOOP
    s := TO_CHAR(selected_items(i));
    q := q || ' and TO_CHAR(orig_geo_loc_sys) LIKE '''|| s ||'%'' ' ;
    END LOOP;
    q := q || ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    Hope this helps...
    Anton

  • Interactive Reporting - Multiple SELECT stmts in 1 query

    Is it possible to multiple/nested select statements in 1 query? Actually what I need to do is pull records for the last 12 months. The SQL that I'm basing my IR query from has multiple SELECT statements and uses the add_month function w/ a parameter ranging from 0 to -12.
    Thanks.
    Terri

    Here's some of the additional SELECTs. There are more after these that I didn't include since it would be fairly long.
    CREATE OR REPLACE VIEW DEFECT_INVENTORY
    (NEW_COUNT, CLOSE_COUNT, BEGINNING_COUNT, ENDING_COUNT, MONTHNAME,
    SEVERITY)
    AS
    select New_Count, Close_Count, Beginning_count, Ending_Count,r.Monthname, r.Severity from
    (select p.New_Count, q.Close_Count,p.sev Severity, p.Month_Name Monthname from
    (Select count(bg_bug_id) New_Count,a.Month_Name, a.sev
    from
    (select bg_bug_id,
    bg_severity sev,
    bg_user_10 app,
    bg_detection_date,
    bg_closing_date,
    to_date(bg_user_26, 'yyyy-mm-dd') as cancel_date,
    to_date(substr(bg_vts,1,10), 'yyyy-mm-dd') as vts,
    to_char(to_date((to_char(add_months(sysdate, -11), 'MM')||'/01/'||to_char(add_months(sysdate, -11), 'YYYY')), 'MM/DD/RRRR') -1, 'MON-YY') as Month_Name,
    bg_status,
    to_date((to_char(add_months(sysdate, -11), 'MM')||'/01/'||to_char(add_months(sysdate, -11), 'YYYY')), 'MM/DD/RRRR') -1 AS rpt_DATE_end,
    to_date((to_char(add_months(sysdate, -12), 'MM')||'/01/'||to_char(add_months(sysdate, -12), 'YYYY')), 'MM/DD/RRRR') AS rpt_DATE_beg
    from bug ) a
    where (a.bg_status not like '65-Cancelled'
    and a.bg_detection_date <= a.rpt_DATE_end
    and a.bg_detection_date >= a.rpt_DATE_beg
    and a.cancel_date is null)
    group by a.sev, a.Month_Name) p,
    (Select count(bg_bug_id) Close_Count,a.Month_Name, a.sev
    from
    (select bg_bug_id,
    bg_severity sev,
    bg_user_10 app,
    bg_detection_date,
    bg_closing_date,
    to_date(bg_user_26, 'yyyy-mm-dd') as cancel_date,
    to_date(substr(bg_vts,1,10), 'yyyy-mm-dd') as vts,
    bg_status,
    to_char(to_date((to_char(add_months(sysdate, -11), 'MM')||'/01/'||to_char(add_months(sysdate, -11), 'YYYY')), 'MM/DD/RRRR') -1, 'MON-YY') as Month_Name,
    to_date((to_char(add_months(sysdate, -12), 'MM')||'/01/'||to_char(add_months(sysdate, -12), 'YYYY')), 'MM/DD/RRRR') AS rpt_DATE_beg,
    to_date((to_char(add_months(sysdate, -11), 'MM')||'/01/'||to_char(add_months(sysdate, -11), 'YYYY')), 'MM/DD/RRRR') -1 AS rpt_DATE_end
    from bug ) a
    where (a.bg_status like 'Closed'
    and a.bg_closing_date <= a.rpt_DATE_end
    and a.bg_closing_date >= a.rpt_DATE_beg
    and a.bg_closing_date is not null)
    or
    (a.bg_status like 'Closed'
    and a.vts <= a.rpt_DATE_end
    and a.vts >= a.rpt_DATE_beg
    and a.bg_closing_date is null)
    or
    (a.bg_status not like 'Closed'
    and a.bg_closing_date <= a.rpt_DATE_end
    and a.bg_closing_date >= a.rpt_DATE_beg
    and a.bg_closing_date is not null)
    group by a.sev, a.Month_Name) q
    where p.sev = q.sev) r,

  • Setting current values in Multiple Select List in SQL Query based Report

    Hi,
    I have a report based on a sql query that contains a multiple select list. Unfortunately I cannot get the multiple select list to display the current values (p_value) correctly. I have created a page item, :p311_current_versions, that is set using a pre-header process and it returns a value with a colon delimited format e.g. '10.1.2.1.0:10.1.2.2.0'. Then this item is used in the sql query to set the current value (p_value) of the apex_item.select_list_from_query function. However when the table is displayed, instead of having two entries, 10.1.2.1.0 and 10.1.2.2.0 selected, it has an extra entry '10.1.2.1.0:10.1.2.2.0' selected.
    Here is my code:
    select distinct a.product, a.version from (
    select distinct
    apex_item.display_and_save(2,product)||apex_item.hidden(1,env_product_id) PRODUCT,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(3,decode(product, 'HTTP Server' , :p311_current_versions, version), 'SELECT distinct version d, version r FROM ebs_tech_stack where
    product ='''||PRODUCT||'''',
    decode(PRODUCT, 'HTTP Server' ,'multiple="multiple" style="width:170px"','style="width:170px"'),
    'NO') as version
    from ebs_environment_tech_stack
    where environment_id = :p311_umgebung_id) a order by a.product
    If anyone can help me figure out how to set the current values correctly I'd be really grateful!!
    Thanks in advance,
    Jean

    Jean,
    I don't think this is possible using the apex_item package. The select_list_from_query function accepts only a single value for the second parameter.
    Scott

  • Report query with multiple selects

    On some of my Report Queries (that have multiple selects) it sometimes changes the rowset when I edit the specific SQL.
    For example, I have 2 selects in my Report Query andnd when I download the XML my first select’s data goes into <ROWSET1> and my second select’s data goes into <ROWSET2>. I then make my template and everything is good.
    But, sometimes when I edit the SQL in the report it changes the ROWSET number of the data so now my first select’s data in ROWSET2. This blows up the report. Is this a bug? Why is it switching the rowsets back and forth?

    I'm referring to the Report queries under shared components.
    My first query is like this:
    select A.emp_id
    from tab1 AC4, tab2 AC3, tab3 AC2, tab4 AC1, tab5 A
    where A.year = :page_year
    and C.FK_SCHOOL IN (SELECT c001
    FROM apex_collections AC1
    WHERE AC1.collection_name = 'SIS_REPORTS_SCHOOLS')
    and nvl(C.ACTIVE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C.ACTIVE,'NONE'),C001)
    FROM apex_collections AC2
    WHERE AC2.collection_name = 'SIS_REPORTS_ACTIVES')
    and nvl(C5.CALENDAR_NO,'NONE') IN (SELECT decode(c001,'NONE',nvl(C5.CALENDAR_NO,'NONE'),C001)
    FROM apex_collections AC3
    WHERE AC3.collection_name = 'SIS_REPORTS_SCHOOL_CALENDAR_NOS')
    and nvl(C10.CLUSTER_CODE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C10.CLUSTER_CODE,'NONE'),C001)
    FROM apex_collections AC4
    WHERE AC4.collection_name = 'SIS_REPORTS_CLUSTER_CODES')
    My second query needs to select the detail info from other tables, but I only want to do it for the (master) records that were returned in the first query.

  • "Select All" option in Multiselect Query Filter

    Hi,
    Is there a way to select all values in a multiselect filter option in a query. currently i have created a variable or a mandatory filter which allows me to select all values one by one and then move it to right side, but its very painful option in certain cases where in i need to select all values. Is there a way where in one can select all values with a single click in Query Filter in Web Analyzer.
    Thanks
    Akila. R

    Hi,
    You can give range values in the Query designer.
    You can include variable selection where user can enter the selections with their own selections.
    Let us know if you still have any issues.
    Reg
    Pra

  • How to create parameter with multiple selection in a query (SQ02) ?

    Hi Exports
    Do you know how to create parameter with multiple selection in a query (transaction SQ02)?
    thanks.

    Hi
    i know how to create user parameter at SQ02,
    the question is how to create multiple selection parameter?

  • Filter report on multiple select lists dynamically

    Hello
    Can somebody tell me how to filter/refresh a interactive report based on multiple select lists?
    The select lists are created with apex_item.select_list_from_query, because I need to create them dynamically.

    do not post duplicate questions/posts when you already have {message:id=10453848}
    It doesn't make any sense

  • Multiple Select in same Query

    I'm building a report based on a single table in APEX. The report requires the following.
    select user, project, count(start date ), project, count(end date) where date between 01-jan-07 01-feb-07
    (simplified to show the idea)
    basicaly a count of projects that started between two dates and the ones that ended between the same two dates relating to the user.
    I have writen the selects to do both parts and they work BUT is it posible to glue them together in a single statement?
    I tried to searching the forum on "multiple selects" but never realy got anything close.
    Is it possible to do this type of select? If so does it have a special name (so I can try a search on that name)
    Thanks
    Bjorn

    First of all, '11-MAY-06' and '19-MAY-06' are not dates, they are strings. This has some important disadvantages:
    1) Oracle has to implicitly convert them to a date, when they are being compared to a date column
    2) Your application will be NLS (National Language Support) dependent, so they might break when you change a setting
    3) When compared to a varchar2 or other string column, the comparison will give incorrect results. For example: 12-MAY-06 will be between 06-JAN-06 and 18-JAN-06
    Bottom line: convert those dates to real dates using the to_date function, or the date 'yyyy-mm-dd' variant.
    Back to your question, apparently you don't want to count the number of occurences of CON_ACTUAL_START and CON_SIGN_OFF, but you only want to count them when this date is between the two boundary values. So use the following:
    select mli_clo
         , count(case when con_actual_start between date '2006-05-11' and date '2006-05-19' then 1 end)
         , count(case when con_sign_off between date '2006-05-11' and date '2006-05-19' then 1 end)
    ...Regards,
    Rob.

  • Multiple select staement in 1 query

    Hell Team,
    I am New to this SQL world. Please help me out with htis:-
    I have following queries:-
    #select name from v\$database;
    #select log_mode from v\$database;
    #select count(*)"INVALID_OBJECTS" from dba_objects where status='INVALID';
    #select count(*) "INVALID_N/A_INDEXES" from dba_indexes where status!='VALID';
    #select count(*)"Invalid Triggers" from user_objects where OBJECT_NAME like '%TRIGGERS%' and status='VALID';
    #select count(*) "Broken Jobs" from dba_jobs where broken!='Y';
    #select count(*) "Block Corruption" from v\$database_block_corruption;
    i want a table which can be generated just by select cmd and it will list the result of all the above queires as follow:-
    DB_NAME ARCH_MOD INV_OBJ INV_IDX INV_TRG B_JOB BLK_CRP
    PROD NOARCHIVELOG 0 86 6 3 0
    I mean to say i want multiple select queries into 1 table (note:- i m not saying to create a tables and then insert,update(using select from other tables), its just a sheel script that will fetch these record into a txt file)

    Something like this ?
    SQL> ed
    Wrote file afiedt.buf
      1  select a.name,
      2  a.log_mode,
      3  b."INVALID_OBJECTS",
      4  c."INVALID_N/A_INDEXES",
      5  d."Invalid Triggers",
      6  e."Broken Jobs",
      7  f."Block Corruption"
      8  from
      9  v$database a,
    10  (select count(*) "INVALID_OBJECTS" from dba_objects where status ='INVALID') b,
    11  (select count(*) "INVALID_N/A_INDEXES" from dba_objects where status !='VALID') c,
    12  (select count(*) "Invalid Triggers" from user_objects where OBJECT_NAME like '%TRIGGERS%' and status='VALID') d,
    13  (select count(*) "Broken Jobs" from dba_jobs where broken!='Y') e,
    14* (select count(*) "Block Corruption" from v$database_block_corruption) f
    SQL> /
    NAME      LOG_MODE     INVALID_OBJECTS INVALID_N/A_INDEXES Invalid Triggers Broken Jobs Block Corruption
    ORCL      ARCHIVELOG                 1                   1                0           3                0
    SQL>Now just try to replace your script with this :
    #!/bin/bash
    export hostname=$2;
    echo " export started"
    export ORACLE_SID=$1;
    export ORACLE_HOME=/$1db/db/10.2.0;
    export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/lib;
    export TNS_ADMIN=/$1db/db/tech_st/11.2.0/network/admin/$1_$2;
    PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/local/oracle/bin:/usr/local/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch;
    export PATH=$PATH:$ORACLE_HOME/bin;
    echo $ORACLE_HOME
    echo "all export complete"
    #export var1=/$1db/db/tech_st/11.2.0/$1_$2.env
    #export var2=/$1db/db/tech_st/11.1.0/$1_$2.env
    export var3=/$1db/db/10.2.0/$1_$2.env
    #. /$1db/db/tech_st/11.2.0/$1_$2.env
    #. /$1db/db/tech_st/11.1.0/$1_$2.env
    #./$1db/db/10.2.0/$1_$2.env
    sqlplus / as sysdba <<eof
    select a.name,
    a.log_mode,
    b."INVALID_OBJECTS",
    c."INVALID_N/A_INDEXES",
    d."Invalid Triggers",
    e."Broken Jobs",
    f."Block Corruption"
    from
    v\$database a,
    (select count(*) "INVALID_OBJECTS" from dba_objects where status ='INVALID') b,
    (select count(*) "INVALID_N/A_INDEXES" from dba_objects where status !='VALID') c,
    (select count(*) "Invalid Triggers" from user_objects where OBJECT_NAME like '%TRIGGERS%' and status='VALID') d,
    (select count(*) "Broken Jobs" from dba_jobs where broken!='Y') e,
    (select count(*) "Block Corruption" from v\$database_block_corruption) f;
    exit; >>filename.txt
    Let us know if it works for you or not.
    Regards
    Girish Sharma

  • Querying for a script insert multiple selected objects...

    Is there a script or plugin which insert multiple selected objects in one new text frame with one click?
    And is there a script or plugin which extract the content of anchored text frame out it's frame and replace it with it's frame. and extract selected text and insert it inside a new anchored text frame in it's place? (like convert text to table - convert table to text, but instead table we use text frame)

    Hi,
    Using OMB scripting to set attribute properties in a data mapping sort of defeats the purpose of utilizing a graphical user interface to define and set properties for a data mapping? Surely the GUI data mapping tool was created to get away from writing scripts and scripting would also require that you know the name of the data mapping, table operator and the set of attribute names for which you have to write one line of script to set each property value, i.e. 90 lines to set 90 attribute values.
    Cheers,
    Phil

Maybe you are looking for

  • While selecting Frame for Table in Smartform

    hi   While i am selecting Frame for Table in Smartform , it displaying very Bold frame. wat is the reason, guide me

  • I accidentally erased my segate external hard drive out of finder, and I do not know how to get it back!

    I was playing around with finder this evening and I dragged 'segate' out from under devices to my desktop and it popped and made the trash sound. It is not in my trash bin and I unplugged the hard drive and plugged it back in again and still does not

  • How to get back "on my mac" in Notes?

    Had an "on my mac" account/section in the Folders List in Notes but deleted the only folder in it which caused "on my mac" to disappear altogether. But I want to have an "on my mac" account/section so that I can keep some notes only for the computer

  • Connect via sqlplus to sys

    I'm trying to connect to sys via sqlplus, but i cannot. I can connect to other schema like HR but not to SYS. I'm sure the password is correct because via sql developer for example. Can you help me please?

  • Cant create smooth angled lines

    im needing to create a fairly simple graphic of a plain rectangle with an arrow on one side. the rectangle looks fine, 1 pixel border, but the arrow looks badly jagged in all browsers. ive tried 2 lines angled, the arrow shape and a triangle, slightl