Query Result Column Order

I'm working with an embedded db query that specifies columns
by name in the result set, i.e., no *. However, the order of the
columns in the result set seem to be quite random - or at least
dependent on which column is being searched. I'm showing the
results via "resultsGrid." How do I enforce a consistent column
order in query results?
Thanks,
Al

What you describe boils down to a reinvention of materialized views.
Did you consider using them?
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Select query result set order

    Hi,
    Can I know the order in which Oracle outputs the result set of a simple SELECT query ? Will the output always be same as the order in which rows got inserted ?
    Please advise,
    Thanks,
    Smitha

    If you include an ORDER BY than the order of the result set is known.
    It will not always be the same as the order in which rows got inserted.

  • Query result set ordered incorrectly

    Hallo,
    I have this problem.
    I have a table (lisitab) with a list of codes, for example:
    A0001
    A0002
    AD063
    AY064
    In my java class I run a query (select lisi_codi from lisitab order by lisi_codi) and I expect the following order:
    A0001
    A0002
    AD063
    AY064
    but I have this result:
    AD063
    AD064
    A0001
    A0002
    What is strange it's that if I execute the query in SQL*Plus or other tools (PLSQLDeveloper for example) it works fine! When run my JDeveloper application I have the bad ordered result set.
    My DB is Oracle 8.1.7 on Windows2000(SP2). The DB language is set as AMERICAN_AMERICA.WE8DEC.
    The client is set with NLS_LANG AMERICAN_AMERICA.WE8DEC and I'm using Oracle OCI JDBC Drivers 8.1.7 deployed with JDeveloper 3.2.
    I presume there's a bug (a BIG BUG!!!) into JDBC Drivers.
    How can I work without trusting in order by ?
    Could anyone help me?
    Thanks
    G.Grimoldi
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Joaquin Sanchez Jimenez ([email protected]):
    Hi:
    Could you send table description and complete query?. What version of JDBC and database ...
    J.<HR></BLOCKQUOTE>
    The table (lisitab) is very simple:
    lisi_codi varchar2(16) not null (PK)
    lisi_desc varchar2(40)
    The select is:
    select lisi_codi from lisitab order by lisi_codi
    I'm working on Oracle 8.1.7 on Windows 2000 and JDBC drivers are Oracle JDBC 8.1.7 deployed with Jdeveloper 3.2.
    I also tried with an Oracle 8.1.7 DB with charset WE8ISO8859P1 and a client with the same charset, but the result is same: bad ordered result set!
    Is there anybody at Oracle who could tell me why and how to resolve (or workaround) this tedious and dangerous problem?
    Thanks
    null

  • How to order SQL query results in order given in IN Clause

    Hi,
    I Need to construct a query, which takes a string as input and results for those should be sorted in the order in which request was made.
    Say, we have a couple of students, and the grades in different subjects to be the result of the query.
    If John and Jane are the two students,
    and if input is John,Jane
    my output should be listing John, his subjects and grades
    and then Jane, her subjects and grades.
    I read somewhere in other posts, that i could use a query combined with regular expression to split a string into a temp table/array and use this as my input for my select query. Then use the rownum or level from this temp table to sort the data in order sent in.
    But am not able to put together a query which would work for me.
    Anyone with any pointers on this would be highly appreciated.
    Thanks

    Hi,
    [This thread|http://forums.oracle.com/forums/thread.jspa?threadID=702891&tstart=0] is about splitting up delimited lists. You'll want to keep the n-th value from the user-supplied list, as well as n itself, in a result set, so you can use it in both your WHERE- and your ORDER BY clause.
    If you're using SQL*Plus, you can also keep the whole list in a substriution variable, and use INSTR to see where individual values appeard in that list. Personally, I'd trust the first method (split and store) more.

  • Splitting the Borders of Query Results Columns

    Hi Matez,
       I have in my Row a 'Period' Structure defined.
       This Structure contains :-
        Current Mth
        Previous Mth
        Variance
        Current YTD
        Budget YTD
        Variance YTD
      Now, when I execute my query I would like the borders of the results query to have borders as follows :-
       Current Mth
       Previous Mth
       Variance
       Current YTD
       Budget YTD
       Variance YTD
       Hence, we should be able to get full borders around
       Current Mth
       Previous Mth
       Variance
       (then)
       Current YTD
       Budget YTD
       Variance YTD
       Please advice the possibility ?

    Eugene mate,
       The problem here is that when I don`t seem to be able to restrict the Range of Selection on the Border.
        It`s like if I attempted to just put a outline border on one of the columns only, but the WHOLE result rows also gets the outline border
       It`s like I have the following columns
       Current YTD
       Previous Month
       Variance
       Current YTD
       Budget YTD
       Variance YTD
       Now, I want to have a outline around
       Current YTD
       Previous Month
       Variance
       Then, separately another outline on
       Current YTD
       Budget YTD
       Variance YTD

  • Is that important column order in a query with row_number function

    Hi folks,
    I am using Oracle 11g R2 on HP-UX machine.
    I have 2 types of query with row_number and I think they are same but output of each of them are different. I changed only column order in query2.
    Query 1 :
    (SELECT
    "LOOKUP_INPUT_SUBQUERY"."CONTRACT_SK" "CONTRACT_SK",
    "LOOKUP_INPUT_SUBQUERY"."SIMCARD_SK" "SIMCARD_SK"
    FROM (
    SELECT row_number ()
    OVER (
    PARTITION BY "R_CON_SUBS_SIMCARD_LK".
    "CONTRACT_SK"
    ORDER BY
    "R_CON_SUBS_SIMCARD_LK"."START_DATE" DESC,
    "R_CON_SUBS_SIMCARD_LK"."SEQ_NUM" DESC NULLS LAST) /* EXPRESSION_3.OUTGRP1.SIRA */
    "SIRA",
    "R_CON_SUBS_SIMCARD_LK"."CONTRACT_SK" "CONTRACT_SK",
    "R_CON_SUBS_SIMCARD_LK"."SIMCARD_SK" "SIMCARD_SK"
    FROM "SRC_OZRDS"."R_CON_SUBS_SIMCARD_LK" "R_CON_SUBS_SIMCARD_LK")
    "LOOKUP_INPUT_SUBQUERY"
    WHERE ("LOOKUP_INPUT_SUBQUERY"."SIRA" = 1))
    Output of this like that :
    CONTRACT_SK SIMCARD_SK
    1     1
    1     3
    1     4
    1     5
    1     6
    1     11
    1     12
    1     14
    1     15
    1     16
    Query 2 :
    (SELECT
    "LOOKUP_INPUT_SUBQUERY"."CONTRACT_SK" "CONTRACT_SK",
    "LOOKUP_INPUT_SUBQUERY"."SIMCARD_SK" "SIMCARD_SK"
    FROM (
    SELECT
    "R_CON_SUBS_SIMCARD_LK"."CONTRACT_SK" "CONTRACT_SK",
    "R_CON_SUBS_SIMCARD_LK"."SIMCARD_SK" "SIMCARD_SK",
    row_number ()
    OVER (
    PARTITION BY "R_CON_SUBS_SIMCARD_LK".
    "CONTRACT_SK"
    ORDER BY
    "R_CON_SUBS_SIMCARD_LK"."START_DATE" DESC,
    "R_CON_SUBS_SIMCARD_LK"."SEQ_NUM" DESC NULLS LAST) /* EXPRESSION_3.OUTGRP1.SIRA */
    "SIRA"
    FROM "SRC_OZRDS"."R_CON_SUBS_SIMCARD_LK" "R_CON_SUBS_SIMCARD_LK")
    "LOOKUP_INPUT_SUBQUERY"
    WHERE ("LOOKUP_INPUT_SUBQUERY"."SIRA" = 1))
    Output of this like that:
    2     874812
    7     70097256
    8     18734091
    9     158024
    10     815397739
    13     22657919
    19     83177779
    20     82579529
    22     5829949
    23     35348926
    25     3865978
    I expected the second output, because there are lots of contract sk but there is one contract_sk in first query result. i did not get the point. What is the problem ?

    user8649469 wrote:
    I changed only column order in query2.So what else do you expect? If you order, for example, by last name, fist name don't you think rows will be returned in a different order (and therefore same row will have different row number) than ordering by first name, last name?
    SY.

  • Column order in a select * query

    Suppose I have 256 columns in a table and if I query select * from  tablename ,what will the column order in the result.Will this be always same as order as in created statement?

    If the columns were all in the original CREATE TABLE statement, then, yes, the ordering of columns in SELECT * FROM will match the order from the CREATE TABLE statement.
    If columns were added after the initial create, then the original columns will come first (in their order) and then the added columns (in their order), etc.
    In the real world, it is a very bad practice to use SELECT * and have expectations about the ordering of the columns. Consider this scenario:
    Table T was created and implemented in production a year ago with columns A, B, C
    A project started up three months ago and added column D but the project is stalled in development. So in development T had columns A, B, C, D
    Later, another project started up and added columns E and F. Unlike the other project, it has progressed to Test. and Production. So in Development the table has columns A, B, C, D, E, F. In test and production the table has columns A, B, C, E, F.
    Now that stuck project has progressed to Test and Production. Now T has columns A, B, C, E, F, D in test and production but still A, B, C, D, E, F in development.
    Until someone notices and decides to fix it (where and how?)
    Be very, very careful about using SELECT *.

  • Query block has incorrect number of result columns

    can anyone edit my query to eliminate below error ??
    SELECT FLROOPENHEAD.RONBR RepairOrder,FLROOPENHEAD.DATEOPENED DateOpened,NULL DateClosed,
    (SELECT FLREPAIRSTAT.DESCRIPTION  FROM FLREPAIRSTAT
    WHERE FLREPAIRSTAT.REPAIRSTATID = FLROOPENHEAD.REPAIRSTATID) RepairOrderStatus,
      (SELECT flrt.DESCRIPTION FROM FLREPAIRTYPE flrt
      WHERE flrt.REPAIRTYPEID = FLROOPENHEAD.REPAIRTYPEID) RepairType,  FLROOPENHEAD.REPAIRCENTER  RepairCenter,
    FLROOPENHEAD.FLVEHICLEID , FLROOPENHEAD.FLATTACHID,'O'
    FROM FLROOPENHEAD   WHERE FLROOPENHEAD.LDEVNBR =2334
    AND ((extract(DAY FROM SYSTIMESTAMP - TIMEOPENED)*24)+(extract(HOUR FROM SYSTIMESTAMP - TIMEOPENED)) <= 72)
    UNION
    SELECT FLROHISTHEAD.RONBR RepairOrder,FLROHISTHEAD.DATEOPENED DateOpened, null, FLROHISTHEAD.DATECLOSED DateClosed,
    (SELECT FLREPAIRSTAT.DESCRIPTION  FROM FLREPAIRSTAT
    WHERE FLREPAIRSTAT.REPAIRSTATID =FLROHISTHEAD.REPAIRSTATID) RepairOrderStatus,
    (SELECT flrt.DESCRIPTION FROM FLREPAIRTYPE flrt
    WHERE flrt.REPAIRTYPEID = FLROHISTHEAD.REPAIRTYPEID) RepairType, FLROHISTHEAD.REPAIRCENTER  RepairCenter
    from FLROHISTHEAD WHERE FLROHISTHEAD.LDEVNBR =2334
    AND ((extract(DAY FROM SYSTIMESTAMP - FLROHISTHEAD.TIMECLOSED)*24) + (extract(HOUR FROM SYSTIMESTAMP - FLROHISTHEAD.TIMECLOSED)) <= 72)
    ORDER BY DateOpened, RepairOrder
    i think error was at second Where condition.
    Error at Command Line:1 Column:0
    Error report:
    SQL Error: ORA-01789: query block has incorrect number of result columns
    01789. 00000 -  "query block has incorrect number of result columns"
    *Cause:   
    *Action:

    Hi,
    On comparison with 1st query and 2nd query,it can be easily noticed that ,1st query is returning 4 columns and 2nd query returns 5 columns in select clause.
    In order to work union ,both of your queries should select equal no of columns.
    Hence replace your query
    Original query(1st ) :
    SELECT FLROOPENHEAD.RONBR RepairOrder,FLROOPENHEAD.DATEOPENED DateOpened,NULL DateClosed,
    (SELECT FLREPAIRSTAT.DESCRIPTION  FROM FLREPAIRSTAT
    WHERE FLREPAIRSTAT.REPAIRSTATID = FLROOPENHEAD.REPAIRSTATID) RepairOrderStatus,
    ....Relplace with :
    SELECT FLROOPENHEAD.RONBR RepairOrder,FLROOPENHEAD.DATEOPENED DateOpened,NULL,/*Here you need missed the comma */
    DateClosed,
    (SELECT FLREPAIRSTAT.DESCRIPTION  FROM FLREPAIRSTAT
    WHERE FLREPAIRSTAT.REPAIRSTATID = FLROOPENHEAD.REPAIRSTATID) RepairOrderStatus,
    ....Hope this helps
    Regards,
    Achyut

  • Query result list sort order in the Service Manager Portal (2012).

    Hi there,
    I have a setup a user prompt for a request offering in which the values are based on a query results list.  When the user prompt is displayed in the portal the order of the items presented based on my query results list is in reverse
    alphabetical order (Z to A) instead of traditional A to Z.  I can clicked the column header to toggle the sort order, however having to do this is slightly annoying.
    My query results list is based on returning the Department field of a specific criteria of template AD user accounts (which are imported into the CMDB via the AD Connector).
    Where and how is the sort order defined?
    Thanks
    Bryan

    Hi Bryan,
    After a quick test I can see the query results is in a descending order based on the first display column of the query results configuration. In the Request offering wizard I don't see an option for sorting. I don't think it is possible to configure this
    out of the box. 
    But maybe it is possible from a Self Service Portal rendering point of view. Maybe there is a key for it in the settings.xml just like the maximum of query results:
    http://blogs.technet.com/b/servicemanager/archive/2011/11/08/advanced-query-results-customization-for-request-offerings.aspx
    If this is possible I'm also curious to know how! :)
    - Dennis

  • PL/SQL to map query results to a column?

    Is there a programmatic way to map the query result to a value in a table?
    I have table A. There's a column with a carat-delimited string 0^0^1^ that I can parse with substr/instr functions. So, query that table/column for a 5th digit that sits between 5th and 6th ^ character.
    There's table B. It has a 'position' column and 'key' column. How do I let the table A know that when I query table A for 5th digit, it needs to map to table B's where position=5?
    thanks,

    Did you try to run those statements? Please do so next time.
    Also the creation of table C (or is it D) and E are missing.
    However, the tricky part is in deciphering table A to make up for the flawed design.
    I hope this piece of SQL is helpful for you, because you could join the outcome to your other tables:
    SQL> create table a
      2  ( visitor_id number(*,0),
      3  adate date,
      4  carat varchar2(4000 byte),
      5  ip_address varchar2(4000 byte),
      6  state varchar2(4000 byte),
      7  city varchar2(4000 byte),
      8  id number(*,0) not null enable,
      9  constraint "a" primary key (id)
    10  )
    11  /
    Tabel is aangemaakt.
    SQL> insert into A
      2  (VISITOR_ID,ADATE,CARAT,IP_ADDRESS,STATE,city,id) VALUES(194296532,TO_DATE('2007-06-26.00.01.46',''),'-1^1^2^0^3^85741^3^0^176^0^1
    ^-1^41^-1^-1^US^0^-1^2^0^1^^^^^^^','71.226.9.44','az','tucson',1);
    1 rij is aangemaakt.
    SQL> insert into A
      2  (VISITOR_ID,ADATE,CARAT,IP_ADDRESS,STATE,city,id) VALUES(37482918,TO_DATE('2007-06-26.00.01.46',''),'0^1^2^5^^78154^3^7^184^0^1^2^
    17^2^1^US^1^0^1^0^0^^^^^^^','70.163.196.111','tx','san antonio',2);
    1 rij is aangemaakt.
    SQL> select id
      2       , visitor_id
      3       , i position
      4       , c value
      5    from a
      6   model
      7         return updated rows
      8         partition by (id, visitor_id)
      9         dimension by (0 i)
    10         measures ('^' || carat || '^' c)
    11         rules
    12         ( c[for i from 1 to length(regexp_replace(c[0],'[^\^]'))-1 increment 1]
    13           = regexp_substr(c[0],'[^\^]+',1,cv(i))
    14         )
    15   order by id
    16       , position
    17  /
            ID VISITOR_ID   POSITION VALUE
             1  194296532          1 -1
             1  194296532          2 1
             1  194296532          3 2
             1  194296532          4 0
             1  194296532          5 3
             1  194296532          6 85741
             1  194296532          7 3
             1  194296532          8 0
             1  194296532          9 176
             1  194296532         10 0
             1  194296532         11 1
             1  194296532         12 -1
             1  194296532         13 41
             1  194296532         14 -1
             1  194296532         15 -1
             1  194296532         16 US
             1  194296532         17 0
             1  194296532         18 -1
             1  194296532         19 2
             1  194296532         20 0
             1  194296532         21 1
             1  194296532         22
             1  194296532         23
             1  194296532         24
             1  194296532         25
             1  194296532         26
             1  194296532         27
             1  194296532         28
             2   37482918          1 0
             2   37482918          2 1
             2   37482918          3 2
             2   37482918          4 5
             2   37482918          5 78154
             2   37482918          6 3
             2   37482918          7 7
             2   37482918          8 184
             2   37482918          9 0
             2   37482918         10 1
             2   37482918         11 2
             2   37482918         12 17
             2   37482918         13 2
             2   37482918         14 1
             2   37482918         15 US
             2   37482918         16 1
             2   37482918         17 0
             2   37482918         18 1
             2   37482918         19 0
             2   37482918         20 0
             2   37482918         21
             2   37482918         22
             2   37482918         23
             2   37482918         24
             2   37482918         25
             2   37482918         26
             2   37482918         27
             2   37482918         28
    56 rijen zijn geselecteerd.Regards,
    Rob.

  • Column order in SQL Query (PL/SQL function returning a query)

    Hi,
    when I define a PL/SQL function returning a query inside a region, I often find that the column order is arbitrarily changed.
    How do I enforce the column order ?
    Bye,
    Flavio

    I removed the 11th column called service_name from this dynamic query: and now the report says: report error:
    ORA-01403: no data found. I messed around with the Headiuns Type. It was set to Custom. I changed it to Column Names. There is no difference.
    I am not sure how to fix?
    declare topqry varchar2(32000);
    whereqry varchar2(32000);
    finalqry varchar2(32000);
    var_status varchar2(100);
    division_status varchar2(50);
    office_status varchar2(1000);
    user_status varchar2(1000);
    overdue_status varchar2(1000);
    begin
    if :P10_FALLBACK = 'All' then
    var_status:= ' and vp.status in (''FA'',''FBA'',''FBI'',''25%'',''50%'',''90%'',''Closed'') ';
    elsif :P10_FALLBACK = 'Active' then
    var_status:= ' and vp.status in (''FA'',''25%'',''50%'',''90%'',''FBA'') ';
    elsif :P10_FALLBACK = 'FB' then
    var_status:= ' and vp.status in (''FBA'',''FBI'') ';
    elsif :P10_FALLBACK = 'Closed' then
    var_status:= ' and vp.status in (''Closed'') ';
    elsif :P10_FALLBACK = 'Inactive' then
    var_status:= ' and vp.status in (''FBI'') ';
    end if;
    if :P10_DIVISION = 'All' then
    division_status:= ' and vp.vms_division in (''News'',''Ad Services'') ';
    elsif :P10_DIVISION = 'News' then
    division_status:= ' and vp.vms_division in (''News'') ';
    elsif :P10_DIVISION = 'Ad' then
    division_status:= ' and vp.vms_division in (''Ad Services'') ';
    end if;
    if :P10_OFFICE = '%' then
    office_status:= ' and OFFICE_ID in (select office
    from VMS_OFFICE_ACCESS
    where user_id = lower(:P0_user) ) ';
    else
    office_status:= ' and OFFICE_ID in :P10_OFFICE ';
    end if;
    if :P10_LIMIT_USER = '%' then
    user_status := ' and SALESPERSON in (select first_name || '' '' || last_name
    from VMS_PROSPECT_users u
    join vms_office_access o
    on u.office_id = OFFICE
    where o.user_id = lower(:P0_USER) ) ';
    else
    user_status:= ' and SALESPERSON in (:P10_LIMIT_USER ) ';
    end if;
    if :P10_SHOW_OVERDUE = 'Show' then
    overdue_status:= ' and target_close_date <= sysdate ';
    var_status:= ' and vp.status in (''25%'',''50%'',''90%'',''FBA'') ';
    else
    overdue_status:= ' and FIRST_APPOINTMENT between
    nvl(to_date(:P10_FIRST_APPT_START, ''mm/dd/yyyy''),FIRST_APPOINTMENT) and
    nvl(to_date(:P10_FIRST_APPT_END,''mm/dd/yyyy''),FIRST_APPOINTMENT) ';
    end if;
    topqry := 'SELECT OFFICE_ID ,vp.PROSPECT_ID ,ENTRY_DATE ,ACCOUNT , NEXT_CONTACT_DATE ,ACTION_STEP ,
    TARGET_CLOSE_DATE ,vp.STATUS ,SALESPERSON ,vp.SALES_TYPE ,service_name , FIRST_APPOINTMENT ,MODIFY_DATE ,EST_ANNUAL_REVENUE ,EST_INCREMENTAL_REVENUE ,
    pi.NOTES , pi.SALES_TYPE ,pi.STATUS ,Contact ,Origin_Source FROM VMS_PROSPECTING_ITEMS pi right outer join VMS_PROSPECTS vp on vp.PROSPECT_ID = pi.PROSPECT_ID left outer join VMS_SERVICES vs on vs.service_ID = pi.service_ID where 1 = 1 ';
    whereqry := ' and (not exists (select *
    from VMS_PROSPECTING_ITEMS i3
    where vp.prospect_id = i3.prospect_id)
    or exists (select *
    from VMS_PROSPECTING_ITEMS i2
    where i2.order_id = pi.order_id
    and active = ''Y'' )) and instr(upper(ACCOUNT),upper(nvl(:P10_ACCOUNT,ACCOUNT))) > 0 ';
    whereqry := whereqry || var_status || division_status || office_status || user_status || overdue_status;
    finalqry := topqry || whereqry;
    return finalqry ;
    end;

  • Transferring multi-column query result into MS Excel

    Hello everybody!
    An ultimate novice in Oracle, with some database concepts, is here.
    The very first challenge; which I encoutered is that I want to transfer a Select query result, with multiple columns, into MS Excel sheet in a way that each field occupies a separate column in the sheet.
    I hope the forum members will show me a simple way to get around the problem.
    Thanks in anticipation.
    Rabi

    what will happen the query returns too many rows that
    Excel cant hold? I faced this problem and divided the
    report into "n" numbers based on the number of rows
    returned. Is there any internal logic for it in
    oracle?Excel is capable of holding 65536 rows of data on a sheet.
    Oracle is capable of writing data out to files.
    Oracle does not know or care whether the file it is writing is for Excel or any other product, as the file you are likely to be writing is CSV (comma seperate format) which is an open format, not specifically for Excel. If you need to limit the number of rows per CSV file then you will have to code this "business logic" into your code that produces the CSV file from Oracle.

  • How can I pass/add these results in my Main query's column

    Hello Experts
    I’m working on a subquery. My subquery works fine and give the results what I need. But how can I pass/add these results in my Main query’s column ‘MGRNAME’. Here is my query
    select pc.c_id "Project ID",
    cn.c_id "Client ID", cn.c_last "Last Name", cn.c_first "First Name",
    pj.mgr_id "Manager ID", pj.project_name "Project", MGRNAME
    from project_consultant pc
    join consultant cn
    on (pc.c_id = cn.c_id)
    join project pj
    on (pc.p_id = pj.p_id)
    where lower(cn.c_last) = 'myers'
    and MGRNAME in
    ( select concat (substr(c_last,1,20),
    substr(c_first,1,20))
    as MGRNAME from consultant
    where c_id in (102, 103)
    When I run the above query I got error.
    Thanks a lot on advance

    I’ve join three tables to get the information about I need. I got everything working expert one part. The subquery
    ( select concat (substr(c_last,1,20),
    substr(c_first,1,20))
    as MGRNAME from consultant
    where c_id in (102, 103)
    Gives me the names of employees I need. The output comes 2 names. I’m trying to add these 2 names in my main query and show the results but I got the following error
    Error at Command Line:11 Column:4
    Error report:
    SQL Error: ORA-00904: "MGRNAME": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    I can understand there is something wrong with MGRNAME field but not sure what it is. Can somebody point it out?
    Once again this is main query with single sub query
    select pc.c_id "Project ID",
    cn.c_id "Client ID", cn.c_last "Last Name", cn.c_first "First Name",
    pj.mgr_id "Manager ID", pj.project_name "Project",
    MGRNAME
    from project_consultant pc
    join consultant cn
    on (pc.c_id = cn.c_id)
    join project pj
    on (pc.p_id = pj.p_id)
    where lower(cn.c_last) = 'myers'
    and MGRNAME in
    ( select concat (substr(c_last,1,20),
    substr(c_first,1,20))
    as MGRNAME from consultant
    where c_id in (102, 103)
    Hope it helps

  • How to implement 'Quick Select' column in a query result table?

    Hi,
    I have a requirement in OAF to design a search page with 'Quick select' column.
    One of the column in the query result table should be a quick select.
    Once user clicks on the quick select column, we have to navigate back to the previous page with the row value selected.
    Can anyone help me in this.
    Thanks.

    Also refer the search exercise in the toolbox tutorials.
    you can implement the quick search in the same way as update and delete buttons.
    --Prasanna                                                                                                                                                                                                                                                                                                                                   

  • RPD - Cannot obtain number of columns for the query result :Working with MS SQL 2012 schema

    Hi All,
    I have created my warehouse in MS SQL 2012.
    For management purpose, I have created different schemas in SQL database
    In RPD, Physical layer, when i view data > I get error as
    [nQSError:16002] Cannot obtain number of columns for the query result.
    [nQSError:16001] ODBC error state : S0002 code : 208 message: [Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name 'tbl'..
    [nQSError:16001] ODBC error state : S0002 code : 208 message: [Microsoft][ODBC SQL Server Driver][SQL Server] Statements could not be prepared..
    I have already browsed : OBIEE 11g Strange ODBC Driver Error with SQL Server : Total Business Intelligence ... did not help me
    please help!!!

    Hi All,
    After all R&D it is been found that Oracle business administrator( RPD) needs default dbo schema. It doesn't accept custom schema for pulling data.
    If anybody have other views please share.!!
    Thank you

Maybe you are looking for