IS IT POSSIBLE TO EXECUTE A QUERY BASED ON USER

Hi,
I need to restrict a set of queries to a user. Is it possible.
Thanks
Mini

This is done by standard parametrization using query groups and user authorizations.

Similar Messages

  • Executing SQL-query based on user input in text-box on APEX page

    Hi,
    I'm new to developing in APEX, and I encountered a problem...
    Is it even possible to make such thing: use text area for input of some SQL-query and then execute it on my schema and show results in report item? And if the answer is yes, can somebody provide me tips on how to do that?
    Thanks in advance.

    Denes Kubicek wrote:
    I think this example shows something similar:
    https://apex.oracle.com/pls/apex/f?p=31517:91
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------I see there is executing stored queries example, and text area showing executed one, but not quite understand how to sent sql-query directly from text input, based on your example :/

  • Possible to execute complex query in ExecuteSQL method in DI Server??

    Hi All,
    Is it Possible to execute complex query in ExecuteSQL Method in DI Server?
    Regards,
    G.Suresh

    Hello Guru,
    It is possible. Mostly if it can be done in DI, it will also can be done in DI Server except metadata operaiton, transation management etc.
    I try the following complex query (join, nexted):
    The SOAP Request
    <?xml version="1.0" encoding="UTF-16"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header>
      <SessionID>4FFCFAA3-5493-456A-BC89-410B35AF096C</SessionID>
    </env:Header>
    <env:Body>
      <dis:ExecuteSQL xmlns:dis="http://www.sap.com/SBO/DIS">
       <DoQuery>SELECT OCRD.CardCode, OCRD.CardName, OCPR.Name FROM OCRD JOIN OCPR ON OCRD.CardCode = OCPR.CardCode WHERE OCRD.CardCode IN
    (SELECT DISTINCT ORDN.CardCode FROM ORDN)</DoQuery>
      </dis:ExecuteSQL>
    </env:Body>
    </env:Envelope>
    The SOAP Response:
    <?xml version="1.0"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Body><ExecuteSQLResponse xmlns="http://www.sap.com/SBO/DIS">
    <BOM><BO><AdmInfo><Object>oRecordset</Object></AdmInfo><OCRD><row><CardCode>C002</CardCode><CardName>SAP</CardName>
    <Name>2</Name></row><row><CardCode>C002</CardCode><CardName>SAP</CardName><Name>l</Name></row><row><CardCode>C002</CardCode>
    <CardName>SAP</CardName><Name>Z</Name></row></OCRD></BO></BOM></ExecuteSQLResponse></env:Body></env:Envelope>
    I think you can easily parse the result...
    Kind Regards
    -Yatseas

  • How to Broadcast Control Query based on User Exit Variable

    Hi Gurus,
    How to Broadcast dashboard based on Control Query based on User Exit
    Variable to different users via mail in BW 3.5 version. Any document or
    steps to achieve this will be very helpful.
    Regards
    Vishwanath

    Hi Surendra,
    Thanks for the reply and your suggestion. It will be great if you can help me to answer the below:
    1) What exactly we mean by Control Query - Any example will be very helpful
    2) As you mentioned, yes the user exist to be written will be for user-exit variable for dynamic period selection - An Example on how to create this will be helpful
    3) Once the above variable is created, what are the steps to include this variable in the Bex Query?
    4) Once all the queries to be used in dashboard are implemented with the exit variable, how to create a variant to be used in Broadcasting?
    5) How and where to configure the email recipients (to whom this dashboard will be sent via mail)?
    6) How to set up the BW broadcaster in BW 3.5 using the control query ?( My question is though we have to send the dashboard to the users, which has multiple queries, how a single control query with variant will help us).
    Awaiting your reply.
    Thanks and Regards
    Vishwanath

  • Query Based On User Input

    Hello,
    Is there a way that I can get Discoverer to run different queries based on user input? In other words, I have two parameters "A" and "B". If the user enters a value for "A", execute QUERY1. If the user enters a value for "B", execute QUERY2. If both parameters are left blank, execute QUERY3. If the user enters values for "A" and "B", execute QUERY4.
    I'm fairly new to Discoverer so any help that I can receive on this matter will be greatly appreciated.
    Thank You

    Denes Kubicek wrote:
    I think this example shows something similar:
    https://apex.oracle.com/pls/apex/f?p=31517:91
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------I see there is executing stored queries example, and text area showing executed one, but not quite understand how to sent sql-query directly from text input, based on your example :/

  • Manually execute report query based on condition

    Hi,
    I have 2 queries defined in report as follows:
    Q1) select ename,sal from emp where empno = :emp_no;
    Q1) select ename,sal from emp;
    Based on a specific condition I want to switch between the above 2 queries , based on which report ouput will be generated.
    Example:
    IF <condition is true >
    THEN
    Execute Q1;
    ELSE
    Execute Q2;
    END IF;
    How to do this?
    Thanks

    Also, you can use Ref Cursor query, especially for complicated conditions like :
    IF :FROM_NO IS NULL AND :TO_NO IS NULL THEN
    open temp_CHARACT for SELECT ACCT_CODE,
    ACCT_NAME,ACCT_LEVEL,GROUP_CODE,MAIN_ACCT,OPENING_BALANCE
    FROM CHARACT
    ORDER BY ACCT_CODE;     
    ELSIF :TO_NO IS NULL AND :FROM_NO IS NOT NULL THEN
    open temp_CHARACT for select ACCT_CODE,
    ACCT_NAME,ACCT_LEVEL,GROUP_CODE,MAIN_ACCT,OPENING_BALANCE
    FROM CHARACT
    WHERE ACCT_CODE=:FROM_NO
    ORDER BY ACCT_CODE;     
    ELSIF :TO_NO IS NOT NULL AND :FROM_NO IS NOT NULL THEN
              open temp_CHARACT for select ACCT_CODE, ACCT_NAME,ACCT_LEVEL,GROUP_CODE,MAIN_ACCT,OPENING_BALANCE
              FROM CHARACT
              WHERE ACCT_CODE BETWEEN :FROM_NO AND :TO_NO
              ORDER BY ACCT_CODE;               
    ELSIF :TO_NO IS NOT NULL AND :FROM_NO IS NULL THEN
    open temp_CHARACT for select ACCT_CODE, ACCT_NAME,ACCT_LEVEL,GROUP_CODE,MAIN_ACCT,OPENING_BALANCE
    FROM CHARACT
    WHERE ACCT_CODE<=:TO_NO
    ORDER BY ACCT_CODE;     
    END IF;
    Regards
    Mostafa

  • Web publishing and query based on user login

    Hello,
    I'm not really sure where this question should be asked, but I was wondering if there is a way for me to place a crystal report on our webpage that will query the user that logs in and filters out the results based on the user?
    So if Agent Joe logs in he only sees his own clients info from the crystal report, where is if agent Bob logs in he will also only see agent Bob's client info.
    Thanks for the help!
    EDIT: This is for a Joomla website

    Any help would be greatly appreciated even if it's only pointing me in the right direction, Thanks!

  • Auto  filter settings taking when executed the query for one user id......

    Hi All,
    We are facing one strange issue for  one particular user id  ( i.e for top management) ,when this user executes any of the report  by in putting his own selection parameters say date 15.09.2009 and plant 1111 the output of the report is coming as 15.06.2009 to 19.06.2009 and the plant is also coming as 2222 instead of 1111.
    I have checked it there are variants for this user id .
    When i checked in  the filters in portal it is showing for the cal day15.06.2009 to 19.06.2009,plant 2222,Materials Xyz,Keyfigures say Net amount only, nd more over its getting filtered onalso..... something there is a problem its taking automatic filter values.
    What could be the issue does any one faced this kind of problem?
    Pl help me out by providing your valuable inputs.
    Rgds,
    Rakesh

    closed

  • Filter a Query Based on the Output of Another Query

    Is it possible to run a query based on the put put of another query? I have two queries. One query is based on GL Line items and shows the account assignemnt of postings where a customer has had a debt raised and it been credited to an account assignment e.g. Order, Cost Centre or Profit Centre. The other query is on an AR cube and that shows payment made. I want to bring these together to show the owners of the various account assignments to what extent customers have actually paid the debts that have been raised and credited to them. This I do as the source document of the CO doscument matches the allocation of the ar document. So I have a query that shows the CO journal and another query that shows payments. But I only want to show the payments in the second query for documents displayed in the first query (which can be restricted by period and fiscal year and the particular account assignment).

    Hi,
    This can be acheived by usign a replacement path variable.
    Create replacement pathe variables for those the filter values in the second report nneds tobe restricted from the first.
    Then in the properties of the varioable say replce by query result and input the first query name in it.
    Use these variables in teh filter section of the second report.
    Make sure the characteristics for which you created the replacement path variables are in teh row section of the first Query.
    Now on executing the second query you will have it filtered based on teh values of the first Query.
    Hope this helps.
    Regards.
    Shafi.

  • Differet Load query based on parameter input

    Hi all,
    I'm developing my first application with HTML DB and I have a problem. I have a table with no primary key and a unique index on three columns and only one of these can be null. I'm building a form with my events that execute a query based on the data passed from another page.
    My problem is that I have two queries (one with the clause column_a is null and another one with column_a=value) but I'm not able to condition the execution on more than one item values; I'd like to know how to express into conditional processing section
    PXXvariable_1 is null and PXXvariable_2 is not null.
    I can use a workaround in the query using nvl but I'm wondering if is possible to expresso such constraints in constional processing section.
    Thanks to all,
    Giovanni

    Giovanni,
    See this section of the documentation on the HTML DB URL syntax:
    http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10992/mvl_fund.htm#sthref447
    You want something like this:
    f?P=101:<page ID>:&APP_SESSION.::::PXXPARAM_1,PXXPARAM2:VAL,
    Here, PXXPARAM_1 will be set to VAL and will be set to NULL
    Sergio

  • Query based on Master datasource? - URGENT

    Hi Experts,
    Is it possible to create a query based on MASTER Datasource(Z master datasource)? if possible then how we can go or are there any setttings?...i got confused here..
    thanks in advance.
    regards,
    mahantesh

    If you mean an Infoobject masterdata record, you need to change the IO, Mater data/text tab, check charachter is data target/Infoprovider flag an activate the IO.
    Now you can use it in BEX
    Regards

  • Function Module to Execute BEx Query and Save as work book.

    Hi
    I have a requirement for executing the Query after the data is loaded into the cube and save as Workbook and emailing to the user. Is there any Function module to Execute the Query and saving as Work book? . Please suggest me the way how to approach the problem.
    Thanks for your help in advance.

    Hi,
    It is possible to execute the Query and send the result as workbook vial email to the user.
    For that use should use Information Broadcaster.
    Steps:
    1. Goto information broadcaster.
    2. Choose object type as "Query"
    3.Click create new setting.
    4. Give description and choose distribution type as "Broadcast E-mail"
    5.Choose output format "XML(MS Excel)
    6.In recipient tab Give valid e-mail addres which you want to send.
    7.Save it. and give technical name
    8.Click schedule.
    9.choose "Execution with Data Change in the InfoProvider " correspondig infoprovider will be shown (check the check box)
    10. that's it. whenever data loaded in your infocube, it will be automatically executed and send to user mail.
    <removed> if u want more information let me know.
    Regards,
    Senthil Kumar.P

  • Can I stop a report from Re-executing the query when I go back to that page

    I have a report that has a complicated query and looks at a lot of information to display the results. This query then links of to show details of individual items that were displayed in the result. But when I hit the back button on the browser, it executes the query again and it takes a while for the page to load.
    Is there any way to stop this and only execute the query when the User pushes a Button on the page else display the previous results.
    Thanks
    Sriram

    Another alternative is to make that detail link open in a popup window using
    javascript:popupURL(...);This way, the complicated report page is always visible.

  • Select query based on userinput

    Hi Folks...
    I posted this in another forum, but no reply,so I am posting it here too. I am trying to make a select query based on a user input. Earlier I was having probelms making a select query and printing out the result in the stack trace,with the advice given, I managed to solve that. I am now modifying that code to make a query based on user input, however it's not working, following is the code:
    String userId = request.getRemoteUser();  String sql = "SELECT hoursused FROM sysuser WHERE iduser = ?";    try      {        Connection connection = dataSource.getConnection();        PreparedStatement preparedStatement = connection.prepareStatement(sql);        preparedStatement.setString(1, userId);                ResultSet srs = preparedStatement.executeQuery(sql);                            while(srs.next()) {                          String hoursused = srs.getString("hoursused");                          System.out.println("The hours used are " + hoursused);    }                  }    catch (SQLException e)      {    e.printStackTrace();    }        } 
    stack trace seems to suggest I may have a probelm with this statement:
    "SELECT hoursused FROM sysuser WHERE iduser = ?"; 
    I am not sure how to rectify this, I hope someone can advise, thanks.

    Hi jschell..
    Thanks for responding, I appreciate it. The problem has been solved. No 'sysuser' is not a reserved word in Mysql. Based on the advice given in another forum and also from this site, I managed to solve the problem. I only made one change. This:
    ResultSet srs = preparedStatement.executeQuery(sql);     was changed to this:
    ResultSet srs = preparedStatement.executeQuery();  Thanks.

  • Error in executing SQL query

    Hi All,
    I am working with labview application.
    The database being used is Access.
    The tables i have to use contains the special symbol -   (not underscore.)
    Let the table name be user-data
    When i am executing the query select * from user-data its showing
    error message syntax error in from clause.
    I tried just typing the query in access also and got the same error.
    I believe its because of the usage of the special character other than underscore in table name
    Many applications using the same database is running in VB already.So there is no way for me to rename the table.
    I know i am asking an invalid question.But still....
    Is there any way for me to use the same table name and execute sql query.
    Thanks in advance

    There should be. Try putting the table name in quotes - some DBMS use single quotes, some use double quotes. For example say the table name has a space in it. Try something like:
    select * from 'a funny table';
    or
    select * from "a funny table";   (Actually, I think I'd try this one first...)
    Failing this, you have two choices: change the name of the table, or dump Access and go with a real DBMS - which you will probibly want to do anyway because it will only be a matter of time before you start hitting a performance wall. Access is particularly bad if you have more than one process making a connection to it at a time. Interms of alternatives, there are a couple really good open-source products out there, as well as no-cost versions of Oracle and SQL-Server.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • Address Book does not synchronize

    Hi. My Address Book does not update when I add a contact in Mail. It also does not sync with my iPhone. When I tried to replace the information on my phone, I ended up with all my contacts on the phone being wiped out! I don't use MobileMe. I went to

  • Profit Center Accounting - BFOK_AB

    Dear expert, could you explain me how the table BFOK_AB is taken into consideration for the calculation of the vendor balances to transfer to PCA? I'm interested also to understand the relation between tables BFOK_AB and BFOK_A. Many thanks for your

  • Registering products without the license details

    I have a numbet of Adobe products - cs5 and 6 - on my pc and would like to register them but I have no license details installation keys etc. I think I need this to enable me to move my products on to a new pc. Can anyone point me in the right diecti

  • How do you make groups with your contacts?

    How do i make groups with the contacts? i have a certain group of people i have to update weekly and dont want to have to click on all 14 of their names to tect them

  • I want to know VendorID of pci devices in system.

    Hi. I have a question. I want to display vendor ID & device ID of My pci devices in solaris system. in windows driver... #define VENDORID          0x1234      #define DEVICEID          0x5678      for( bus = 0 ; bus < 256 ; bus ++ ) for( slot = 0 ; s