I need to query from db table and static VO in same time

I have query VO which returns user roles
so the result will be something like 1,5,6,3,1
and i have static list contains the role names with their codes
1 ------> administrator
2 -------> user
3 --------> system manager
I used the first VO to build ADF select one choice contains the code of roles
how can I display the role name instead of its code

thank you john for explaining
if I put the static list in data base the problem is solved, I can get the role names by my query, but NO I can't but it in database
I am now trying to do that by java code but I want to know if that can be done without writing codes

Similar Messages

  • Import data from few tables and export into the same tables on different db

    I want to import data from few tables and export into the same tables on different database. But on the target database, additional columns have been added
    to the same tables. how can i do the import?
    Its urgent can anyone please help me do this?
    Thanks.

    Hello Junior DBA,
    maybe try it with the "copy command".
    http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/apb.htm
    Have a look at the section "Understanding COPY Command Syntax".
    Here is an example of a COPY command that copies only two columns from the source table, and copies only those rows in which the value of DEPARTMENT_ID is 30:Regards
    Stefan

  • Dbms_xmlgen.newcontext query from multiple tables and ||

    I have two questions
    How do I get a dbms_xmlgen.context to query from multiple tables? I have been able to make it work with using one table only, but not with multiple tables.
    And how to get the || (concat) to work within my query for my output to an xml file?
    Here is my current query:
    create or replace function get_xml return clob is
    result clob;
    qryctx dbms_xmlgen.ctxHandle;
    SELECT DBMS_XMLGEN.getxml('select prefix, suffix, fiscal_yr
    FROM rcv.recv_accessions ra
    where ra.prefix = 8 and ra.fiscal_yr = 11')xml into result FROM dual;
    result := DBMS_XMLGEN.getXML(qryCtx);
    This is what I desire:
    SELECT DBMS_XMLGEN.getxml('select ra.prefix||'-'|| ra.suffix||'-'|| ra.fiscal_yr accession, ss.date_in, st.test
    FROM rcv.recv_accessions ra, ser.sero_samples ss, ser.sero_tests st
    where ra.prefix = 8 and ra.fiscal_yr = 11 and ss.raid = ra.id and st.ssid = ss.id')xml into result FROM dual;
    On this both the reference to multiple tables and the concat function cause errors.
    Thank you
    Edited by: user583094 on Mar 2, 2011 3:36 PM

    Hi,
    for the concat do I use xmlconcat?No, XMLConcat is used to concatenate XMLType fragments.
    The || operator will do fine, but you must escape any single quote inside the string :
    SELECT DBMS_XMLGEN.getxml(
    'SELECT ra.prefix ||''-''|| ra.suffix ||''-''|| ra.fiscal_yr as accession,
            ss.date_in,
            st.test
    FROM rcv.recv_accessions ra,
          ser.sero_samples ss,
          ser.sero_tests st
    WHERE ra.prefix = 8
    AND ra.fiscal_yr = 11
    AND ss.raid = ra.id
    AND st.ssid = ss.id'
    INTO result
    FROM dual;Or, use the quoting operator to define a custom string delimiter :
    SELECT DBMS_XMLGEN.getxml(
    q'{SELECT ra.prefix ||'-'|| ra.suffix ||'-'|| ra.fiscal_yr as accession,
            ss.date_in,
            st.test
    FROM rcv.recv_accessions ra,
          ser.sero_samples ss,
          ser.sero_tests st
    WHERE ra.prefix = 8
    AND ra.fiscal_yr = 11
    AND ss.raid = ra.id
    AND st.ssid = ss.id
    INTO result
    FROM dual;BTW, a good practice would be to use bind variables for the query. DBMS_XMLGEN can handle them nicely :
    CREATE OR REPLACE FUNCTION get_xml
    RETURN CLOB
    IS
    qryctx   DBMS_XMLGEN.ctxHandle;
    v_out    CLOB;
    qrystr   VARCHAR2(4000) :=
    'SELECT ra.prefix ||''-''|| ra.suffix ||''-''|| ra.fiscal_yr as accession,
            ss.date_in,
            st.test
    FROM rcv.recv_accessions ra,
          ser.sero_samples ss,
          ser.sero_tests st
    WHERE ra.prefix = :b_prefix
    AND ra.fiscal_yr = :b_fiscal_yr
    AND ss.raid = ra.id
    AND st.ssid = ss.id';
    BEGIN
    qryctx := DBMS_XMLGEN.newContext(qrystr);
    DBMS_XMLGEN.setBindValue(qryctx, 'b_prefix', '8');
    DBMS_XMLGEN.setBindValue(qryctx, 'b_fiscal_yr', '11');
    -- to generate empty elements if necessary :
    DBMS_XMLGEN.setNullHandling(qryctx, DBMS_XMLGEN.EMPTY_TAG);
    v_out := DBMS_XMLGEN.getXML(qryctx);
    DBMS_XMLGEN.closeContext(qryctx);
    RETURN v_out;
    END;

  • Interactive Reporting - Chg Query from Using Table to Result Set w/ same Co

    Currently I have a query that uses an Oracle table. I would like to change the query to use the result set of another query wh/ contains the same information & column names (however, since I am creating the results from scratch, I don't have to wait for the Oracle table to be updated). Is there a way to do this change w/o IR automatically removing the column names from the results and then making me go back into each result set and re-adding them, formatting them, etc. For example, the query currently uses a table called Defect_History, wh/ has columns bug_id, application, sub-app, etc. This table is not updated on a daily basis, so I have created a new query wh/ goes against the source tables used in creating the Defect_History table and puts the latest information into an IR result set. Is there a way to change the current queries that use the Defect_History table to use the IR result set instead w/o basically recreating each of the subsequent queries? I have gone into Dashboard Studio Optimize Utility, but the queries show as using Data Model, Data Model2, etc as the Parent and I am not able to make changes to it.
    Thanks.
    Terri

    I am in the Dashboard Studio - Optimize Utility. When I select that report (or any of the others), the Reparent button is grayed out on the toolbar. I've also tried right-clicking on the report and it's grayed out there as well. Any ideas?

  • Sound coming from both speakers and headphones at the same time in probook 4440s

    I have a Probook 4440s with windows 8 pro(64 bit) with IDT high definition codec installed. Yesterday when i was playing some songs i noticed that the sound was coming from both headphones and speakers even when my headphones are plugeed in and my lappy was having no such problems a few hours earliers while i was watching a movie. Please help..

    It may be because you have both the internal speakers and headphones enabled at the sametime on your laptop. This might just happen automatically when you plug your headphones in. You need to manage your audio devices on your laptop.
    Go to Control Panel> Hardware and Sounds> Manage Audio Devices> Playback Tab (which should already be selected)    
    In the playback tab there should be a list of all the audio devices you are using on your computer. Right click on the one you don't want to use and click disable. This should stop the sound coming from that audio device. 
    Remember: You will need to enable that audio device if you want to listen to sound through it again. Your internal speakers won't work once you enable them again. This might also be the case with your headphones. You may also have to do this every time your plug in a device or once you restart your computer.
    Another note: Sometimes disabled devices will not show up on the audio device list so once you disable a device it will dissappear. This is an easy fix too. Just right click on an audio device and make sure show disabled devices and show disconnected devices is checked.
    I hope this helps.
    (I was using a computer with Windows XP to explain the instructions but it should be similar with your Windows Operating System. You may however have to play around a little on your computer because it may be slightly different) 

  • Sound from both Speakers and headphones at the same time

    I have a Pavilion Sleekbook 15-b003ee 
    recently i have a very annoying problem anytime i plug in a headphone on the sound comes from both the laptop speakers and the headphones 
    I tried the following 
    1- Changed the driver tried both versions on the HP support
    2- changed the headphones tried 3 of them and the same problem
    3- tried the Microsoft HD Audio driver (no sound could comeout from the headphones)
    4- tried disabling the communication device from the control panel while the speakers is on and vise versa 
    5- A system restore 
    still the same problem and i think it maybe an malfunction from the hardware or the headphones jack port on the laptop but how does the sound still come out from the headphones ?
    I thought of buying a USB headphones but the laptop is no more than 3 months old so i think i still on warranty and such if it is a hardware problem , I am currently in Egypt bought the laptop from Egypt also 

    Hello RamiAbbas,
    Take a look at this document, which provides troubleshooting steps that I hope, help resolve your issue.  You are also in warranty, and are welcome to call and speak to an HP rep to help as well.
    Since you are in Greece, look here for the number you need to call for tech support.
    Please let me know if this helps. 
    Good luck!
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • Monitor and capture at the same time?

    Is it possible to view/monitor a video (live from a quickcam) and capture at the same time?
    I looked at the solution here:
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/index.html
    And found "Video Capture Utility with Monitoring" sample program. However it only allows capture! There is no live display of video viewing while the capture is happening.

    Actually, the sample program works once I uncheck Audio.
    I do not have any Audio input device, so I guess that is causing the problem.

  • Need to delete data from main table and all child tables ...

    hi all,
    i need to delete rows pertaining to perticular table and all the child
    tables basing on certain code.i need to write a procedure to which i will
    pass the table name and code..
    like del_info(tab_name,code)
    example:
    suppose if i call as del_info(clients,760)
    the procedure should delete all info reg. code 760
    and the table clients and also all the child records of this table
    perting to code 760.
    simply .. i need to delete from the table passed and also
    all the child tables down the heirarchy regarding certain code ...
    help ???
    Ravi Kumar M

    Hi,
    Depends how you defined referential integrity.
    You can use ON DELETE CASCADE, please read the next doc http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/clauses3a.htm#1002692
    Hope this help you,
    Nicolas.

  • How to use one query against multiple table and recieve one report?

    I have duplicate tables, (except for their names of course) with commodities prices. They have the same column headings, but the data is different of course. I have a query that gives me a certain piece of information I am looking for but now I need to run this query against every table. I will do this every day as well, to see if the buying criteria is met. There are alot of tables though (256). Is there a way to say run query in all tables and return the results in one place? Thanks for your help.

    hey
    a. the all 256 tables whuld be one big partitoned table
    b. you can use all_tables in order to write a select that will write the report for you:
    SQL> set head off
    SQL> select 'select * from (' from dual
      2  union all
      3  select 'select count(*) from ' || table_name || ' union all ' from a
      4  where table_name like 'DB%' AND ROWNUM <= 3
      5  union all
      6  select ')' from dual;
    select * from (
    select count(*) from DBMS_LOCK_ALLOCATED union all
    select count(*) from DBMS_ALERT_INFO union all
    select count(*) from DBMS_UPG_LOG$ union all
    remove the last 'union all', and tun the generated quary -
    SQL> set head on
    SQL> select * from (
      2  select count(*) from DBMS_LOCK_ALLOCATED union all
      3  select count(*) from DBMS_ALERT_INFO union all
      4  select count(*) from DBMS_UPG_LOG$
      5  );
      COUNT(*)
             0
             0
             0
    Amiel

  • How to get the data from one table and insert into another table

    Hi,
    We have requirement to build OA page with the data needs to be populated from one table and on save data into another table.
    For the above requirement what the best way to implement in OAF.
    I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
    Thanks

    You can achieve this in many different ways, one is
    1. Create another VO based on the EO which is based on the dest table.
    2. At save, copy the contents of the source VO into the dest VO (see copy routine in dev guide).
    3. commiting the transaction will push the data into the dest table on which the dest VO is based.
    I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
    if by table you mean a DB table, then no, you can have a VO based on multiple EOs which will do DMLs accordingly.Thanks
    Tapash

  • How can I get data in flat file from Pool table and cluster table ?

    Hi,
    I am working in one Achiving project. My requirement is to get data into flat file from Cluster table and pool table.
    Is there any tool avilable to download data into flat file from pool table and cluster table ?
    if table name given in the selection screen then data will be downloaded into flat file.
    waiting for quick response.
    Best Regards,
    Bansidhar

    Data cannot be retrived directly form the cluster table
    as the Cluster results are stored in Cluster Key say for example PCLkey
    and form that Key we need to fetch the data
    these clustes are not the part of PNP or PNPCE tables
    for ur info kindly check

  • My iphone 5 fell down from the table and now I can't touch screen or do anything with it anymore. Please help me!!!

    My iphone 5 fell down from the table and now I can't touch screen or do anything with it anymore. I send it to Istudio in Thailand and they said it is non authorized so they will not fix for me. I search google and they said that my LCD has problem but people in here said the chip inside my phone have problem??? Please tell me what I need to do. And if I have to change the new, how can I know it is new or fake? Could you give me the price of it please? I'm not Thai people. I study in here so I dont know where to fix it. Please recommend me any truthly store in there if you know. Thank you so much!!!

    You will need to wait for Apple to rectify the issue. Do not make changes at your end.
    https://www.apple.com/support/systemstatus/

  • How to count records from 2 tables and show in RDLC Report

    hi all,
    its being a one day searching for the solution but No Luck.
     I have two SQL tables tblstudetail and tblfeereceiptdetail.
    i just want to count records from both tables and show in RDLC report.
    I tried SQl Query Like This:
    select a.session, a.course,
    Count(CASE a.ADstatus WHEN 'OK' THEN 1 ELSE 0 END ) AS Admission,
    Count(CASE s .I_receiptstatus WHEN 'OK' THEN 1 ELSE 0 END) AS Feeprint
    from
    tblstudetail a
    FULL join
    tblfeereceiptdetail s on s.studentID = a.studentID
    where a.session = '2015' AND s.Fsession = '2015' AND a.adcat = 'Regular'
    GROUP BY a.session,a.course
    ORDER by a.course
    The result Show the Same Value in Both columns
    Session    Course      Admission       FeeDetail
    2015          B.A. I               275              275
    2015          B.A. II              307             307
    2015         B.A. III             255            255
    2015          B.Sc. I             110             110
    2015           B.Sc. II           105            105
    2015          B.Sc. III            64               64
    Actully I want to Count How many ADMISSION have been Taken(FROM tblstudetail) and How many FEE RECEIPT have been Print (From tblfeereceiptdetail).
    please guide me for this as soon as possible.
    thanks in advance...

    I am counting 'OK' in both the table columns I.e 'ADstatus' in tblstudetail and 'feereceiptstatus' in tblfeereceiptdetail
    please suggest me

  • Pull data from SQL Table and display it in mail

    I have a requirement to pull the data from SQL table and send it in email.  Currently I am sending the hard coded info in email but is it possible to pull some data from SQL Table and than format it and send it across in the same email? 
    Can you guide me with steps on this.
    Neil

    There are several ways to do this.  First is to populate a file in a data flow and then send that as an attachment in the send mail task. 
    As far as including the results in the email body this becomes a bit trickier.  To use a variable you would need to use an SSIS variable type of
    Object, this is similar to a collection in .NET.  The problem once the object is populated is that it isn't like a readable result set, but again more like an array or a collection.  There is no native method to take the object variable and
    specify .ToString() or cast its results as text.  You would need to iterate through each row and append it to another variable of type string, this could be done with a script task or ForEach container.
    Also you mentioned formatting the results.  What type of formatting were you looking for.  A limitation of the SMTP send mail task is that the message body doesn't support HTML so if you were looking at creating a table within the mail body you
    would have to use a script task or a custom component
    David Dye My Blog

  • Select from two tables and insert into a third

    I'm trying to do a select from two tables and do an insert into a third table from the two resulting columns.
    I have the following....
    DECLARE
    tempsid number;
    temphostid number;
    BEGIN
    select "DBSID_ID","ID" into tempsid,temphostid from "DBSIDS","SERVERS"
    where "HOST_SID" like '%'||"DBSID_NAME"||'%'
    and "HOST_NAME" not like 'vio%'
    and exists (select "DBSID_NAME" from DBSIDS)
    order by "DBSID_NAME";
    insert into "DBSID_LOOKUP" ("SIDLOOKUP_ID", "SERVERLOOKUP_ID")
    values(tempsid, temphostsid);
    END;
    run;
    I get the error ....
    ORA-06550: line 11, column 18:
    PL/SQL: ORA-00984: column not allowed here
    ORA-06550: line 10, column 1:
    PL/SQL: SQL Statement ignored
    1. DECLARE
    2. tempsid number;
    3. temphostid number;

    okay ... I tried a different way ...
    DECLARE
    a number;
    b number;
    BEGIN
    select "DBSID_ID","ID" into a,b from "DBSIDS","SERVERS"
    where "HOST_SID" like '%'||"DBSID_NAME"||'%'
    and "HOST_NAME" not like 'vio%'
    and exists (select "DBSID_NAME" from DBSIDS)
    order by "DBSID_NAME";
    insert into "DBSID_LOOKUP" (SIDLOOKUP_ID, SERVERLOOKUP_ID) values (a, b);
    END;
    and now it whines about ...
    ORA-01422: exact fetch returns more than requested number of rows

Maybe you are looking for

  • Message error when sending to multiple recipients/contacts

    Ever since 3.0 I can't send messages to multiple recipients. I'm on Optus in Australia using a 16gb 3G. Anyone else having this problem? Any fixes?

  • Downloading ALV report in excel and csv format

    1.I have generated a report in ALV. Now, I want a button 'generate' on my alv tooldbar. How to do that? 2.Now  clicking on that generate button will show a popup window containing the title 'Save list in file..' And the window will contain two radio

  • ICal and PHP iCalendar Issue/Conflict

    I'm currently using iCal 2.0.4 and I'm trying to publish some calendars to my private server using PHP iCalendar. I have it all set up and I can get it working, but I am running into one specific problem: The minimum permissions needed for this whole

  • Blank thumbnails in photo

    I have just downloaded OS 4.0.1 for an iPhone 3G (not an S), in photo the last months worth of thumbnails won't display, I am still able to select photos and display them larger but not at camera roll level, any answers?

  • How do I update stocks widget?

    Every time I try to add a stock I get a message saying "failed to validate symbol". I am trying to add well known stocks from a published list such as DJI? Why am I getting that message and how do I update my list?