Changing sql-statement before executing query

I want to change the sql-statement of a query just before it is executed.
I have tried it with a query redirector/sessionevent listener, but I could get it to work.
Do you have any examples.
I want to change the tablename in a sql-statement like this:
before
select id from emp
after
select id from emp_v
Any examples out there to do this?

... I am using SAP NetWeaver BI 7.0
Monique

Similar Messages

  • Can I change sql statement for some query runtime?

    Hi All!
    The problem that I have to implement report with query like this: select * from a where b in (?,?,?). The number of parameters depends on user choice. On the client side it will be a list of check boxes. Is there any way to implement such report? I can see just one way so far - to modify sql statement runtime.
    Thanks!

    hello,
    create a user-parameter myListe or myWhere (wee examples below) and change your query to
    select ... from ... where b in (&<myList>)
    or even better
    select ... from ... &<myWhere>
    now you can pass in the constructed list or where clause. you can also construct the values in the afterParameterform-Trigger
    regards,
    philipp

  • Newbie (View sql statement before execute immediate)

    Here is a sample:
    <code>
    drop table dummy;
    create table dummy(county varchar2(20)
    ,fiscalyear number(4,0)
    ,wavkeyid number(4,0));
    Insert into dummy(county,fiscalyear,wavkeyid)
    values('Jefferson',2012,59);
    commit;
    </code>
    I am trying to use a bind variable in the SQL statement.
    I would like to see the statement before it is executed.
    Example
    Select county from dummy where wavkeyid=59 and fiscalyear=2012
    Is there a way for me to see the line above?
    <code>
    PROCEDURE test_BindVar
    AS
    v_message_tx varchar2(200);
    v_wavkeyid_nr number:=59;
    v_county_tx varchar2(40);
    BEGIN
    v_message_tx:='Select county from dummy '||
    ' where wavkeyid=:x and fiscalyear=2012 ';
    dbms_output.put_line
    ('v_message_tx '||v_message_tx);
    execute immediate v_message_tx into v_county_tx using v_wavkeyid_nr;
    dbms_output.put_line
    ('v_county_tx '||v_county_tx );
    END;
    </code>
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE 10.2.0.4.0 Production"
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    TIA
    Steve42

    you missed the forum you are in ;)
    "SQL Developer (Not for general SQL/PLSQL questions)"
    recommend to post your question to the related forum on OTN.

  • Need help in resolving the below error - SQL statement to execute cannot be

    Here is my CO as below , which creates a callable statement.
    try {
    OAApplicationModule oaapplicationmodule = pageContext.getApplicationModule(webBean);
    OADBTransactionImpl t = (OADBTransactionImpl)oaapplicationmodule.getOADBTransaction();
    OracleCallableStatement proc = (OracleCallableStatement)t.createCallableStatement(lquery, -1);
    proc.execute();
    t.commit();
    catch(SQLException sqlexception)
    throw OAException.wrapperException(sqlexception);
    After running the page , getting the below error ... ( Please find the below error stack )
    I reffered the developement guide but did not get helpful things.
    Please provide me any clues on the same.
    Regards Raghu
    -- Error Stack ---------------------------------------------------------
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27123: SQL error during call statement preparation. Statement: null
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2637)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: SQL statement to execute cannot be empty or null
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleConnection.privatePrepareCall(OracleConnection.java:1138)
         at oracle.jdbc.driver.OracleConnection.prepareCall(OracleConnection.java:1054)
         at oracle.jbo.server.DBTransactionImpl.createCallableStatement(DBTransactionImpl.java:3033)
         at cisco.oracle.apps.xxchr.element.server.webui.XXCHRElementSetSearchCO.processFormRequest(XXCHRElementSetSearchCO.java:343)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.sql.SQLException: SQL statement to execute cannot be empty or null
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleConnection.privatePrepareCall(OracleConnection.java:1138)
         at oracle.jdbc.driver.OracleConnection.prepareCall(OracleConnection.java:1054)
         at oracle.jbo.server.DBTransactionImpl.createCallableStatement(DBTransactionImpl.java:3033)
         at cisco.oracle.apps.xxchr.element.server.webui.XXCHRElementSetSearchCO.processFormRequest(XXCHRElementSetSearchCO.java:343)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    Edited by: Raghu on Sep 14, 2010 2:58 AM

    check the code pasted by me again
    Connection conn = pageContext.getApplicationModule(webBean).getOADBTransaction().getJdbcConnection();
    Connection conn = oaapplicationmodule.getOADBTransaction().getJdbcConnection(); //Right oneThanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get SQL statement from (Collection) query.execute();

    We have a JDO Persistence class ClassName that execute query using following code. After this statement get executed, record does not get updated in the DB. Is there a way to check what SQL statement got submitted in the (Collection) query.execute(); ??? <br><br>
    Extent extent = pm.getExtent(ClassName.class, false); <br>
    Query query = null; <br>
    try { <br>
    query = pm.newQuery(extent, filter); <br>
    Collection results = (Collection) query.execute();<br>
    Iterator i = results.iterator();<br>
    if (i.hasNext()) {<br>
    ...<br>
    }<br>

    You can always find out the names of tables that are views, using java.sql.DatabaseMetaData and its getTables() method.
    This tends to be a nice source of examples:
    javaalmanac.com
    However, if you're asking for the underlying SQL used to CREATE VIEW, I don't see anything in the API that will give you that. After all, JDBC shouldn't have to know if it's dealing with an ordinary table or a view. I think you'd have to ask your DBA for the underlying SQL.
    Once you have it, what do you plan to do with it?
    %

  • Max no. of Update SQL statements before a commit

    In Oracle 10.2 what is maximum number of UPDATE statements that I can execute before issuing commit.
    If maximum is there either by no. of SQL statements or size in KB, what will happen if I go above this number.
    Thanks in advance for your response.
    Edited by: vbforums on Feb 21, 2011 3:50 PM

    sb92075 wrote:
    I executed 5000+ update statements from Java in one shotI am curious.
    Does each UPDATE change only a single row?
    I'll ask a different way.
    Can a single UPDATE statement change all desired rows?yes
    SQL> conn scott/tiger
    Connected.
    SQL> select table_name from user_tables;
    TABLE_NAME
    EMP
    DEPT
    SQL> create table mytest(cola varchar2(1));
    Table created.
    SQL> insert into mytest values ('A');
    1 row created.
    SQL> insert into mytest values ('A');
    1 row created.
    SQL> insert into mytest values ('A');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from mytest;
    C
    A
    A
    A
    SQL> update mytest set cola='B' where cola='A';
    3 rows updated.
    SQL> commit;
    Commit complete.
    SQL> select i * from mytest;
    C
    B
    B
    B
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@vmlnx01 dbs]$ exit
    logout

  • Validate SQL string before executing

    I am attempting to find a way to validate an SQL script file before executing against a database. This is to allow any errors within the script to be identified and fixed before running against a pre-live / live database.
    These scripts may contain both DDL and DML.
    Is there any way to run the script and only have the changes visible to the current user, with all other database users unaffected until the changes have been checked (in a similar way to running an insert / update / delete without committing the changes)? Failing this, are there any tools to check the validity of the statements within an SQL script file?
    Any help with these or alternative solutions would be much appreciated.
    Cheers,
    Steve

    This is not sensible.
    How can you test a DML that creates a table (that does not create the physical table) and then test a DDL that uses that table that was not created and of which no record exist?
    The validity of a SQL statement (DML or DDL) depends on numerous factors, including the state of the database at that specific point in time that it is being run. You may test/check a DML that creates an index and it is fine.. until run on production where it times out as it cannot get a lock on the table in order to create the index.
    Or there is insufficient free space in the tablespace to build the index. Or the index is build in parallel and one of the PQs fail because on an Oracle bug, resulting in the complete DDL failing.
    Etc. Etc.
    If the intention is to be able to test an upgrade/patch/install script for a production database for every single potential problem and error, and then have a 100% guaranteed success rate in running that on production.. er.. excuse me for a moment..
    <mad laughter heard from outside>
    Er.. okay. Back again.
    This will need - no compromises and just for starters - the exact same h/w platform, o/s, Oracle s/w, and duplicated production database (cloned perhaps) as the test platform.
    And if this is not possible or feasible then you should forget about having that script tested in such a fashion in order to have a 100% guarantee of a successful production deployment... and investigate the optimum method to test as far as possible, and build a comprehensive plan for change management and dealing with problems out of this upgrade, on production.

  • SQL statement not executing

    Please enlighten me. This is driving me crazy.
    I don't know if this is a database or java code related problem.
    JVM: 1.4.2
    Database: Oracle 9i
    Objective: trying to add a row into a table
    Problem: 1. SQL statement never gets executed.
    2. Application freezes. I have to terminate it myself.
    Any Ideas?
    void addCourse(){
    try {
        DriverManager.registerDriver ( new oracle.jdbc.driver.OracleDriver () ) ;
       System.out.println("Driver registered");  //---> ok.
    Connection conn = DriverManager.getConnection ( dbPath, username, password ) ;
       System.out.println("Connected");   // -----> it connects fine
       ResultSet rset = stmt.getResultSet();
       System.out.println("getting result set");  //-----> gets the resultSet fine
      Statement stmt = conn.createStatement();
      System.out.println("statement created");  //------> it creates statement
    7 = are the credits. Number on table. Length allowed 5.
    CS 500 = are the course code. Varchar2 on table. Length allowed 20
    Java = Actual course name. Varchar2 on table. Length 30
    3 = credits. Number on table. Length 5.
              // Prepare a statement to insert a record
              String sql = "INSERT INTO course VALUES (7 , 'CS 500', 'Java', 3 )"; //-->ok. Tested it manually 
              // Execute the insert statement
            stmt.executeUpdate(sql);  //----> *** java program freezes right here.***
            System.out.println("sql executed");   //--> Checked table. SQL never gets executed.
    catch ( SQLException ex ) {   //---> no error messages thrown.
    System.err.println(ex.getMessage());
      System.err.println(ex.getErrorCode());
      System.err.println(ex.getSQLState());
    }

    Nothing looks amiss in the code... How long are you waiting before you manually terminate?
    Can you replace the executeUpdate() with execute and change the INSERT to a SELECT? Does that work normally (you should be sure to get at least one row to verify that it is working correctly)? Can you select and update a different table in a different tablespace successfully?
    Couple of possibilities (I know this is weak):
    1) You have hit a deadlock condition because the table is locked by another or same process.
    2) You are running into network problems.
    3) Your insert is being queued up in Oracle's transaction manager (if configured).
    4) Have you tried both the Oracle thin and Oracle OCI driver? Do they both fail without error?
    5) Can you turn off autoupdate and try the insert? Does the executeUpdate() return then?

  • SQL STATEMENT OF A QUERY

    Hi all
    Can we see the SQL statement of a BEx query, if so , where and how?
    Thanks in advance.

    Yes, you can do that in transaction RSRT. Enter the query name, click the button "Execute & Debug" and click the checkbox for SQL code.

  • Parsing a sql statement without executing it

    Hello everybody,
    I'd like to know a way of parsing sql statements in order to validate them, thus I'd get the error messages beforehand without executing them.
    Here we have the hard task of analyzing several sql scripts and then sending corrections to the development team and thirty party companies before applying them in our production databases. I'm willing to create a web/pl sql program that does such hard task, at least a program that identify basic errors such as missing table owner, non-existing tables, sintax errors and so on...
    Any tip will be of great help!
    Thanks in advance.

    Doing an explain plan will parse the statement prior to calculating the plan. Eg:
    SQL> explain plan for select * dual;
    explain plan for select * dual
    ERROR at line 1:
    ORA-00923: FROM keyword not found where expectedEven easier if you use Toad or some other GUI front end where the explain plan is a click of a button (or a keyboard shortcut) away!

  • SQL Statement needed for Query Generator

    Dear Experts,
    My view has the following three columns.
    1, Start Date
    2. End Date
    3. Balance.
    I need an SQL statement to write in query generator, which has to check if EndDate is less than the Current date and balance is above zero. If so, it assumes the last date of the job is already over, outstanding materials not yet been returned. Hence it has to return 'Pending'. If EndDate is greater than current date, it means final date for completion of the process is yet to come. So the task is in progress, hence it has to return 'Progress'. If the balance is Zero, all materials connected with the task have been received either as a FG or as Raw Materials. So it has to return, 'Completed'. I need a singe SQL Statement for this.
    Please help me.
    Thanks in advance.
    Regards
    Anand

    Dear Anand,
    Try this one:
    CASE balance WHEN 0 THEN 'Completed' ELSE CASE WHEN DATEDIFF(DD, EndDate, GetDate()) >= 0 THEN 'Progress' ELSE 'Pending' END END
    I have assumed you don't have negative balance.  It that is not true, give me the complete case.
    Thanks,
    Gordon
    Thanks,
    Gordon

  • Sql statement from abap query

    is there any chance to get the sql statement (not program) from any abap query created via SQ01?
    I can get the code of program that generated by system, but I cannot get pure sql statement.
    any answer will be appreciated

    I see no parameters, and in the abstract that SQL ought to work.
    However, I halfway suspect that either User, Users, Password, or pass is a reserved word and somebody is getting confused. Try renaming your columns and table...

  • SQL statement running balance query with previous balance taken into account

    Hi Guys
    I have a SQL statement which caclulates the running balance
    for a list of transactions in a transactions table. This SQL
    statement is as follows:
    SELECT transID, debit, credit,
    (SELECT SUM(debit-credit)
    FROM transactions as D1
    WHERE D1.transID <= D0.transID) AS balance
    FROM transactions AS D0
    The only problem I'm having is that I have to display
    transactions between a particular date range. I have for eg.
    transID, transDate, debit, credit fields in my db.
    However the problem I'm having is that when the transaction
    records are pulled out for the specified date range the balances
    are only calculated for those records. I need someway of having a
    balance b/f (brought forward) so that the selected records use that
    as a 'starting' balance and then calculate the running balance as
    normal.
    Any easy solutions?
    Many, many thanks for your help in advance.
    All the best
    Wesley

    You'd need to determine the b/f then apply it against the
    transaction records when they are pulled for a date range. So if
    the date range is
    Feb 1st, 2009 -> Feb 28th, 2009
    You'd need to also get the previous balance in a separate
    query, then use it to correctly display the running balance when
    you output the date range.
    I suppose a simpler way involving a little more DB work (and
    possibly lots of coding) is to store the current balance as well
    with each transaction; then when performing a date range you'd have
    the balance as well and not have to calculate it on the fly.

  • Passing Parameter before execute-query?

    I want to do the following scenario, please I need help so I can do this.
    On Execute query i want a parameter to be passed.
    For Example
    I have a table of employees, and if any user executes query on employees form then before execution of query, form must first asks to give it a department name then it executes the query and of course we will get the result of that specific department.
    I hope i have made clear what i am looking to do. but i need help here.
    Thanks in advance.
    Maz

    Several ways
    May be the easiest:
    . define a non-DB Item (of apropriate type) ahead of your block to be queried,
    may be in a new non-DB-block (depends on lyout of forms
    . check on pre-query if there's a value given and abort if empty
    . define in the where clause of the block: emp.columns = :<block.crit_item>
    where crit item is the above mentioned non-DB-Item.
    More effort for the following alternative:
    . define a window
    . define a content canvas (for the new window)
    . define a non-DB-block with a non-DB-Item
    . set focus to that item on KEY-EYEQRY (assumes that key-Exeqry is called in your query process) and ask user to enter the value
    . redo query (KEY-EXEQRY on that block or add a button), this includes to set focus back to your daa block and do exe-qry there
    . set where claus in analogy to above.

  • Item color change when active in Execute Query?

    I have master detial form for up to three level, I want that background color of item change when our mouse get on that item in execute query. Please if any body tried it and got success please share it with all Regards and Thanks in Advance.
    Abbas.

    in execute querydo you mean "after execute query"?
    there is a block property "Current Record Visual Attribute Group" - maybe this is what you're looking for?

Maybe you are looking for

  • Rendering a PDF/Mime Type in cfDIV

    Hi there I have a cfform that looks at files in a directory. The template is meant to allow users to select a document and and view it on the page. The relevant code is: Main Page: <cfform name = "name"> <cfinput name="displayName"  id="displayName"

  • Can we do a "Save As"

    with Numbers on the iPad? Thanks... Doug

  • Setting number of rings for incoming call

    how does one control the number of rings regarding incoming calls before it goes to voice mail.

  • Lost my flash drive alias

    My flash drive was showing this morning. I somehow dragged the alias out of the finder to watch it disappear into the "clouds." Is there any way to see it again, AND access it?

  • Binghamton University Blocks Port 5060

    I dropped my daughter at her new college and discovered that we are unable to make an iChat video connection between her MacBook and my Powerbook. Specifically I am getting a message that the other person did not accept the incoming call and it times