Getting Username to pass into LOV select statement

Hello!
I'm wondering if its possible to get the username of the current user logged in and pass it as a variable into a select statement used in a dynamic LOV in Oracle AS Portal?
What I'm attempting to do is pull all the values from a table that equal the current user's username to user on a portal report
so (as a rough example)
select color from mytable where username = 'whatever the user name is would be here'
And then the current user would get a list of values from which to select based off of the values entered in this table.
The issue I'm having is determing how to fill the 'whatever the user name is would be here' portion with the actual logged in user's username (or even if its possible). I know on the actual portal one can do #USER.FULLNAME# to display their username, is there a similar "variable" one may use to get the username for a LOV sql call?
I can get it to work if I statically fix the username to a particular value (ex: where username = 'Joe.Hacker') but I'm unsure if theres a variable or bind value (for lack of a better term) to grab the username on the fly.. dynamically.

portal.wwctx_api.get_user can be used in the SQL query of your portal report to get the user_name of the currently logged-in portal user. For more info on wwctx_api, see the 10.1.2 or 10.1.4 portal API docs at http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1012/index.html or http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/index.html

Similar Messages

  • How to pass values in select statement as a parameter?

    Hi,
    Very simple query, how do I pass the values that i get in the cursor to a select statement. If table1 values are 1,2,3,4 etc , each time the cursor goes through , I will get one value in the variable - Offer
    So I want to pass that value to the select statement.. how do i do it?
    the one below does not work.
    drop table L1;
    create table L1
    (col1 varchar(300) null) ;
    insert into L1 (col1)
    select filter_name from table1 ;
    SET SERVEROUTPUT ON;
    DECLARE
    offer table1.col1%TYPE;
    factor INTEGER := 0;
    CURSOR c1 IS
    SELECT col1 FROM table1;
    BEGIN
    OPEN c1; -- PL/SQL evaluates factor
    LOOP
    FETCH c1 INTO offer;
    EXIT WHEN c1%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(offer);
    select * from table1 f where f.filter_name =:offer ;
    factor := factor + 1;
    DBMS_OUTPUT.PUT_LINE(factor);
    END LOOP;
    CLOSE c1;
    END;

    Hi User,
    You are looking somethuing like this, as passing the values to the Cursor as a Paramter.
    DECLARE
       CURSOR CURR (V_DEPT IN NUMBER)    --- Cursor Declaration which accepts the deptno as parameter.
       IS
          SELECT *
            FROM EMP
           WHERE DEPTNO = V_DEPT;    --- The, Input V_DEPT is passed here.
       L_EMP   EMP%ROWTYPE;
    BEGIN
       OPEN CURR (30);       -- Opening the Cursor to Process the Value for Department Number 30 and Processing it with a Loop below.
       DBMS_OUTPUT.PUT_LINE ('Employee Details for Deptno:30');
       LOOP
          FETCH CURR INTO L_EMP;
          EXIT WHEN CURR%NOTFOUND;
          DBMS_OUTPUT.PUT ('EMPNO: ' || L_EMP.EMPNO || ' is ');
          DBMS_OUTPUT.PUT_LINE (L_EMP.ENAME);
       END LOOP;
       CLOSE CURR;
       DBMS_OUTPUT.PUT_LINE ('Employee Details for Deptno:20'); -- Opening the Cursor to Process the Value for Department Number 20
       OPEN CURR (20);
       LOOP
          FETCH CURR INTO L_EMP;
          EXIT WHEN CURR%NOTFOUND;
          DBMS_OUTPUT.PUT ('EMPNO: ' || L_EMP.EMPNO || ' is ');
          DBMS_OUTPUT.PUT_LINE (L_EMP.ENAME);
       END LOOP;
       CLOSE CURR;
    END;Thanks,
    Shankar

  • Getting error after putting variable in select statement

    Hi All,
    Kindly help me with Pl/sql code
    here i'm trying to put variable in select statement ....
    I successfully put the Yr and Mnth ..but getting error for loop variable "i"
    Here i'm getting error that too because of " i" only-->TRIM(UPPER(TO_CHAR(TO_DATE(i||'-'||Mnth||'-'||Yr,'dd-Mon-YYYY'),'DAY')))
    Please find the full code below.
    Declare
    Yr number not null:=2010;
    Mnth varchar2(20) not null:='Jun';
    v_val number:=0;
    begin
    for i in 1..2 loop
    case i
    SELECT count(*) into v_val
    FROM DUAL
    WHERE TRIM(UPPER(TO_CHAR(TO_DATE(i||'-'||Mnth||'-'||Yr,'dd-Mon-YYYY'),'DAY')))
    in (UPPER('Monday'),UPPER('Tuesday'),UPPER('WEDNESDAY'),UPPER('THURSDAY'),UPPER('friday'))
    end case;
    end loop;
    end;

    Declare
      Yr number not null:=2010;
      Mnth varchar2(20) not null:='Jun';
      v_val number:=0;
    begin
      for i in 1..2 loop
      SELECT count(*) into v_val
      FROM DUAL
      WHERE TRIM(UPPER(TO_CHAR(TO_DATE(i||'-'||Mnth||'-'||Yr,'dd-Mon-YYYY'),'DAY')))
      in (UPPER('Monday'),UPPER('Tuesday'),UPPER('WEDNESDAY'),UPPER('THURSDAY'),UPPER('friday'));
    end loop;
    end;

  • Dynamic Parameter LOV Select Statement

    I have a parameter form with a value for the fiscal year and equipment ID. I want to populate the equipment ID list of values based on the fiscal year that is selected.
    My query for the equipment ID list of values would be SELECT EQPID,NAME FROM EQPLIST WHERE FY = :FY.
    When I tried to add this query to the list of values of the equipment ID parameter I get REP-0781: Bind variables are not allowed in the Select statement.
    Is there a way to dynamically generate the list of values select statement in a reports trigger?

    Hi,
    What version of Oracle Reports are you using?
    Unfortunately, it is a limitation of Oracle Reports to not restrict values based on other parameters - for sure until Reports 6i and I believe until the recent new versions.
    The other way to do what you want to do is to do it outside of Reports, if you have an Oracle Forms application. For example, you can create a simple Oracle Form that captures the Report parameters and then submits the report from the Forms. In Forms, you can implement the solution you are looking for - restricting values based on values of other parameters. In reports, you can't do that.
    If you have a few other reports that have similar requirements, then you can create a form to launch reports and submit all your reports from there after capturing all your parameters there.
    Venkat

  • How to pass a parameter into a select statement using a bulk collect

    Using a cursors I can use execute immediate to pass a parameter to specify a table name.
    I have modified the procedure not to use the cursor. I am using a collection using a bulk insert into a nested table. How can I specify the table the table name as a parameter without using the execute immediate statement.
    Thank you

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • Getting a dumb after writing a SELECT statement at TABLE level of SMART

    hi all,
    i have created a RATE COMPARISON REPORT.In that Report i have to display Rate Price against  RFQ No.For this purpose i have write a code at SMART FORMS in TABLE.Following are the code:
    SELECT SINGLE netpr
      INTO it_detail
      FROM ekpo
      INNER JOIN ekko ON
      ekko~ebeln = ekpo~ebeln
      WHERE ekko~BSTYP EQ 'F'
      AND   ekko~spras eq 'E'
    AND   ekpo~ebeln eq IT_DETAIL-EBELN
    This code is assign with TEXT FILED  at TABLE level.when i execute it i get the following dump.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CXSY_OPEN_SQL_DB', was not caught in procedure "%CO2" "(FORM)"_,
    nor was it propagated by a RAISING clause.Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated.
    The reason for the exception is:
    In a SELECT access, the read file could not be placed in the target field provided. Either the conversion is not supported for   the type of the target field, the target field is too small to include the value, or the data does not have the format required for the target field.
    could any body tell me what is problem in my SELECT query statement after executing giving me a dump.
    Thanks,
    sappk25

    Hi
    The select query is wrong, as you should not move the single field into a table (it_detail)....
    Change the query as follows...
    data: v_netwr type netwr.
    SELECT SINGLE netpr
      INTO v_netwr
      FROM ekpo
      INNER JOIN ekko ON
      ekkoebeln = ekpoebeln
      WHERE ekko~BSTYP EQ 'F'
      AND   ekko~spras eq 'E'
    AND   ekpo~ebeln eq IT_DETAIL-EBEL
    if sy-subrc eq 0.
      move v_netwr to it_detail.
    endif.
    Hope this helps....

  • How do i retrieve information from the JSP into my SELECT statements?

    I need to retrieve the information that is being entered into JSP page.. So that i can use them to do an SQL statement.. but im not very sure if my codes are correct.. Following are my codes.. Pls help.. thx
    MyJSPPage.jsp
    <jsp:useBean id="user" class="user.User" scope="session"/>
    <form name="loanItem" method ="POST" action="user">
    <input type="hidden" name="userID" value="<jsp:getProperty name="user" property="userID"/>">
         <tr><td align=left height="34"> <b> <font size="4">Member ID:</font>
    </b> </td>
              <td height="34">
              <jsp:getProperty name="user" property="userID"/></td>
         </tr>     
    ==================================================================================
    MyManager.java --> this file is where all my SQL statements are ..
    [l]String itemType = session.getParameter("itemType");[l] (--->> is how i retrieve info from the JSP page?)
              if (itemType.equals("Book"))
                   String sqlQuery1 = "select loanDuration from ItemPolicy where itemType ='" + itemType+ "'";
                   System.out.println(sqlQuery1);
                   ItemPolicy itempolicy = null;
                   try {
                        db = new Database();
                        rs = db.readRequest(sqlQuery1);
                        if (rs != null && rs.next()) {
                             itempolicy = new ItemPolicy();
                             itempolicy.setLoanDuration(Integer.parseInt(rs.getString("loanDuration")));
                        db.close();
                   } catch (SQLException se) {
                                  se.printStackTrace();
                                  throw (new UserException("Unable to retrieve from Database!"));
                             } catch (Exception e) {
                                  e.printStackTrace();
                                  throw (new UserException("Unknow error encountered!"));
                   String dueDate = util.getDueDate(itempolicy.getLoanDuration());
              else if (itemType.equals("Magazine"))
    ==================================================================================
    Thanks in advance...

    you should change to request.getParameter("itemType").
    or just System.out.print the itemType to see it got the value.
    Hope it helps.

  • Can't get username and password into client proxy

    Hello all,
    I am creating a client proxy using class xem_measurementImport (the doMeasurementImport method). I call this from an ABAP program, and it pushes measurement data into the EC (Environmental Compliance) system, which runs in Java.  Everything has been running well, except for one thing.  When I run the program in the foreground, it prompts me for a username and password, and when I run it in the background (it will be run that way in production), it gets a SOAP/authentication fails error message from the method, since username & password could not be supplied.  I tried to recreate my client proxy, but when it is created, the wizard does not prompt me for my name & password, which it should do, so that it can supply it to the calling program via the logical port.  Is this a configuration issue that Basis needs to address?   Thanks for any help you can give.

    gauravjlj wrote:
    because client will install the mysql not me. and I need username and password for the further programming.
    there is any file in mysql installation which can give me the username and password.
    please tell me.
    thanks
    gaurav agrawalNo. If the "client" is installing the DB (and, I assume, administrating it, I.E. removing the large security holes that exist in the default installation), then why don't you simply ask the "client" for this info a dialog?
    Otherwise, you should be providing a script in your installation package that modifies the DB to your needs, and instruct the "client" to install a "default" root password until after the script has run, and then to change the "root" password again. A Java application should definately not be worried about this stuff.

  • Getting Username and Password into getConnection()

    Hi,
    After my recent encounter with XSQLConnectionManager[Factory] interfaces I seem to have stumbled upon another problem. I'm trying to let the user login from a HTML login page. The user gives the system his/her password and usercode by entering them into two input boxes that are sent to a servlet for handling using the POST method.
    I read a document (XSQLPages Publishing Framework) and it says I should take the following steps: (and I did)
    1: Test that the request type is a servlet
    2: Cast XSQLPageRequest to XSQLServletPageRequest
    3: Call getHttpServletRequest() on the XSQLServletPageRequest object.
    All this I did succesfully. Then I try to retrieve the parameters "usercode" and "wachtwoord" (Dutch for password). By using the following call in my own XSQLConnectionManager's getConnection method (as described in the document):
    System.out.println(servletPageReq.getHttpServletRequest().getParameter("wachtwoord"));
    I expected it to show me the password in JDeveloper's message window but instead I get a the string "null" returned to me in the message window. I tried to get the password using the same call in the servlet and that works fine.
    BTW the servlet calls an XSQL page using the process() method which works fine too.
    I hope someone can help me out on this one.
    Thanks,
    Han Vermolen

    Hi Paul,
    That's sort of what I assumed was happening, but I'm not actually wanting to authenticate for the webservice call it seems.  I'm wanting to capture their username/password via acrobat prompt then push it along to the soap service.  So I guess via script I would want to do:
    1. prompt the user for username/password via acro-prompt (not sure how to do this)
    2. capture their input in variables (again not sure from acro-prompt)
    3. set up soap message (I can do)
    4. send data ("")
    5. receive data on LC side and use the user/password to authenticate in a database table I created ("")
    6. modify a field based on authentication allowed/denied ("")
    It doesn't necessarily have to be an actual authentication box, but I just want a username/password prompt so I can get those values.
    Thanks,
    Alex

  • How to get the previous record in the select statement

    I am trying to update the parent part number as a parent for component part number. I can assign the main part with level 1 as a parent and it looks like this.
    PART_NUMBER     PART_LEVEL     PART_PARENT
    1140000000T     3     1140001755L
    1140001755D     2     1140001755L
    1140001755L     1     
    A1010000139     5     1140001755L
    A1010015001     4     1140001755L
    A1010000139I     4     1140001755L
    A40210062     2     1140001755L
    A1010001579     4     1140001755L
    but, I need to assign the previous level part as the parent part instead of level 1. I can add a new column to store this value. I need the structure as
    PART_NUMBER     PART_LEVEL     PART_PARENT
    1140001755L     1     
    1140001755D     2     1140001755L
    A40210062     2     1140001755L
    1140000000T     3     A40210062
    A1010015001     4     1140000000T
    A1010000139I     4     1140000000T
    A1010001579     4     1140000000T
    A1010000139     5     A1010001579
    We might have multiple parts at the same level, so I need to make sure that correct parent is assigned to the part. Anybody has any idea?
    Thanks

    spooHi,
    How to do that depends on your data.
    Post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data (formatted, within \ tags), if it's not the reuslts you already posted.   If you can show what your problem is using commonly available tables (like scott.emp), then you don't have to post any sample data; just the results.
    Post your existing query, too;.  Always say what version of Oracle you're using.
    It looks like you're currently doing something like this:SELECT     ename
    ,     LEVEL
    ,     CONNECT_BY_ROOT ename     AS root_ename
    FROM     scott.emp
    START WITH     mgr     IS NULL
    CONNECT BY     mgr     = PRIOR empno
    which produces this output:ENAME LEVEL ROOT_ENAME
    KING 1 KING
    JONES 2 KING
    SCOTT 3 KING
    ADAMS 4 KING
    FORD 3 KING
    SMITH 4 KING
    BLAKE 2 KING
    ALLEN 3 KING
    WARD 3 KING
    MARTIN 3 KING
    TURNER 3 KING
    JAMES 3 KING
    CLARK 2 KING
    MILLER 3 KING
    where the last column shows the ancestor *farthest* above the current row.
    If I understand you, you want to have output that shows the *nearest* anacestor, like this:NAME LEVEL PARENT_ENA
    KING 1
    JONES 2 KING
    SCOTT 3 JONES
    ADAMS 4 SCOTT
    FORD 3 JONES
    SMITH 4 FORD
    BLAKE 2 KING
    ALLEN 3 BLAKE
    WARD 3 BLAKE
    MARTIN 3 BLAKE
    TURNER 3 BLAKE
    JAMES 3 BLAKE
    CLARK 2 KING
    MILLER 3 CLARK
    You can do that by changing a single line:SELECT     ename
    ,     LEVEL
    ,     PRIOR ename          AS parent_ename          -- Changed
    FROM     scott.emp
    START WITH     mgr     IS NULL
    CONNECT BY     mgr     = PRIOR empno

  • Illustrator CS 6 won't paste into a text box/paragraph of text, instead pastes a new line of text in the upper left corner of my document. How can I get it to paste into the selected paragraph or highlighted text like normal?

    I've done it a million times, I copy a selection of type...I select the type that I want to replace it with, and then I paste. Now, Illustrator will only paste the text as a "point text" (a single line) somewhere else on the artboard—it seems to always be the upper left corner of the art board.

    peg,
    In cases of sudden appearance of strangenesses, the list may be relevant, hopefully the easy part at the top.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • How to Get Top 10 records using SQL select statement.

    :-) Hiee E'body,
    I want to generate a sql report in which I only want the top 10 records based on the numeric value of a column.
    For Example,
    To generate a Location Wise, Employee Wise Years of Service Report.
    Here I need the Top 10 Employees according to their No. of Years of Service for all the existing locations using a single query.
    eg.
    Location Emp No. YOS
    India - 22 30
    212 28
    819 24 ...
    US 123 40
    312 33
    90 33
    144 30 ...
    UK 77 20
    79 20
    331 18
    109 16 ...
    Every Location should display their respective Top 10 Employees
    regarding their No. of Years of Service.
    Please let me the know the solution to this.
    Have a nice day.
    Thanking You,
    Vivek Kapoor.

    For example if the table contained (India rows only shown) :
    India 202 30
    India 212 28
    India 819 24
    India 820 24
    India 900 20
    India 920 18
    India 922 17
    India 925 16
    India 926 15
    India 927 14
    India 928 13
    India 929 13
    India 930 12
    do you want to see
    India 202 30
    India 212 28
    India 819 24
    India 820 24
    India 900 20
    India 920 18
    India 922 17
    India 925 16
    India 926 15
    India 927 14
    or
    India 202 30
    India 212 28
    India 819 24
    India 820 24
    India 900 20
    India 920 18
    India 922 17
    India 925 16
    India 926 15
    India 927 14
    India 928 13
    India 929 13
    Also if the India rows were
    India 202 30
    India 212 30
    India 819 30
    India 820 30
    India 900 30
    India 920 30
    India 922 30
    India 925 30
    India 926 30
    India 927 30
    India 928 30
    India 929 30
    do you want to see
    India 202 30
    India 212 30
    India 819 30
    India 820 30
    India 900 30
    India 920 30
    India 922 30
    India 925 30
    India 926 30
    India 927 30
    or
    India 202 30
    India 212 30
    India 819 30
    India 820 30
    India 900 30
    India 920 30
    India 922 30
    India 925 30
    India 926 30
    India 927 30
    India 928 30
    India 929 30
    Please clarify.
    Thanks,
    Partha

  • Passing value as a parameter in select statement

    Hi,
    Very simple query, how do I pass the values that i get in the cursor to a select statement. If table1 values are 1,2,3,4 etc , each time the cursor goes through , I will get one value in the variable - Offer
    So I want to pass that value to the select statement.. how do i do it?
    the one below does not work.
    drop table L1;
    create table L1
    (col1 varchar(300) null) ;
    insert into L1 (col1)
    select filter_name from table1 ;
    SET SERVEROUTPUT ON;
    DECLARE
    offer table1.col1%TYPE;
    factor INTEGER := 0;
    CURSOR c1 IS
    SELECT col1 FROM table1;
    BEGIN
    OPEN c1; -- PL/SQL evaluates factor
    LOOP
    FETCH c1 INTO offer;
    EXIT WHEN c1%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(offer);
    select * from table1 f where f.filter_name =:offer ;
    factor := factor + 1;
    DBMS_OUTPUT.PUT_LINE(factor);
    END LOOP;
    CLOSE c1;
    END;

    Hi Greg,
    Thanks for the response, No there is no ODB.net involved here.
    If I remove the : from :offer. I get this error now.
    Changed SQL is:
    select * from table1 f where f.filter_name =offer ;
    Error report:
    ORA-06550: line 16, column 23:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 16, column 9:
    PL/SQL: SQL Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Passing of internal table values to the select statement as SETS

    Hi All,
    Is there any way that i can restrict the values of a internal table to be passed to a select statement set by set..
    say for eg: if a itab has 1000 entries i want the first 500 to be going out in a select statement as a comparision for all entries and then the next set of 500 to go out..
    Please let me know.. this is very urgent..

    <b>Appending Several Lines</b>
    You can also append internal tables to index tables using the following statement:
    APPEND LINES OF <itab1> TO <itab2>.
    This statement appends the whole of ITAB1 to ITAB2. ITAB1 can be any type of table, but its line type must be convertible into the line type of ITAB2.
    When you append an index table to another index table, you can specify the lines to be appended as follows:
    APPEND LINES OF <itab1> [FROM <n1>] [TO <n 2>] TO <itab2>.
    <n 1 > and <n 2 > specify the indexes of the first and last lines of ITAB1 that you want to append to ITAB2.
    This method of appending lines of one table to another is about 3 to 4 times faster than appending them line by line in a loop. After the APPEND statement, the system field SY-TABIX contains the index of the last line appended. When you append several lines to a sorted table, you  must respect the unique key (if defined), and not violate the sort order. Otherwise, a runtime error will occur.
    Then u can use <b> FOR ALL ENTRIES</b> in select query.
    regards
    vinod

  • Substitution variable in a select statement

    I have a cursor as follows:
    cursor c2 is select'word',cuel.curricular_component_name,cuel.curricular_element_name,phase,cuel.curricular_type,student_contact_hours,faculty_name,objective,cuel.curricular_component_id,cuel.curricular_element_id
    from v_cuel cuel,v_cuelse_facu facu
    where cuel.objective like '%'||vTopic||'%'
    and cuel.phase in (:CONTROL1.PHASE)
    and cuel.curriculum_year = :CONTROL1.CURRICULUM_YEAR
    and cuel.curricular_element_id = facu.curricular_element_id
    and facu.session_nbr = 1
    and faculty_name =
    (select min(faculty_name)
    from v_cuelse_facu
    where curricular_element_id = cuel.curricular_element_id
    and faculty_name not like 'TBA%')
    and cuel.curricular_element_name not in (select cuel_name from topic_search where cuel_name is not null)
    union
    select 'word',curricular_component_name,null,phase,null,null,null,objective,curricular_component_id,null
    from curricular_components cuco
    where objective like '%'||vTopic||'%'
    and cuco.phase in (:CONTROL1.PHASE)
    and cuco.curriculum_year = :CONTROL1.CURRICULUM_YEAR;
    The problem I'm having is with the bind variable :CONTROL1.PHASE. The substitution is not happening. If I replace the bind variable with an acceptable value, the query works properly. If I let forms do the substitution, I get no results from the query. Just to be sure the bind variable is correct, I copied it from one debug pass and pasted into the select statement. It's correct.
    Does anyone have any ideas about what could be happening?
    Thanks,
    Meg Colby

    > and cuco.phase in (:CONTROL1.PHASE)
    You can change the above to:
    and cuco.phase
      in(:Control1.Phase1, :Control1.Phase2, :Control1.Phase3, :Control1.Phase4)And set each of the four Phase values to the values you want (but without the quotes):
    Phase1 = I-1
    Phase2 = I-2
    Phase3 = II
    Phase4 = III
    If you want, you can create a number of :Control.Phase(n) fields, and if any one is null, it won't matter.

Maybe you are looking for