Using a URL parameter in SQL query

Newbie question...

I've developed a dashboard application, and I use the enter SQL bind variables. Everything works well.

I want to do is to have a user access to a page via a URL with the parameters like this:

http://Atlas:7777 / pls/apex/f? p = 112:1:9191429456552868531:P1_ITM_CD_PASSED:JMINV

where P1_ITM_CD_PASSED is the parameter and the JMINV is the value.

So, I want the SQL to run using that:

Select *.
ITM
where itm_cd = ': P1_ITM_CD_PASSED'

I tried to test this on a page. Set up a report from the region, but it seems that the setting is not what makes the SQL. "No record found".

Is there a simple example that someone knows? Maybe I'm missing a point, process, calculation, etc. to be able to use the parameter?

Thanks in advance

Hello

You have an extra ':' in the URL. Try this http://atlas:7777 / pls/apex/f? p = 112:1:9191429456552868531:P1_ITM_CD_PASSED:JMINV

The syntax of the URL of the APEX is described here http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#sthref165

CITY

Tags: Database

Similar Questions

  • Using Variables in a system SQL query

    Hello!

    I m new on Oracle and SQL so I Don t know not big thing about it.

    There is problem of customization:

    Is it possible to use the System Variable % username % in a SQL query?

    I tried... where table.shorttag = "% username %";
    but it does not work.

    Oracle is able to manage Systemvariables? Or y at - it another way to use the current Windows user in a SQL query.
    It is very Important to use the current Windows user and not the Oracle user.

    Thank you

    MFG
    SELECT OSUSER FROM V$SESSION WHERE audsid = USERENV('sessionid')
    

    URS

  • Using CASE in a dynamic sql query

    Hello
    I want to create a dynamic query using the CASE statement to replace the below 2 SQL statements:

    +++++
    Select "create or replace the synonym ' |" SYNONYM_NAME | 'for'. TABLE_OWNER |'. ' || TABLE_NAME | » @'|| SUBSTR (Db_link, 1, 30) |';' OF USER_SYNONYMS where db_link is not null;
    Select "create or replace the synonym ' |" SYNONYM_NAME | 'for'. TABLE_OWNER |'. ' || TABLE_NAME |';' OF USER_SYNONYMS where the db_link is null;
    +++++

    While I have a unique select query which will give her create synonym statements for all with or without links db

    Using the example of CASE statement as below:
    SELECT
    FirstName, LastName,
    Salary, date of birth,
    ABOUT sex
    WHEN'm ' THEN 'male '.
    WHEN 'F' THEN 'woman '.
    END
    Employees


    I don't get how to write this CASE statement. Can someone guide me here?

    Thank you
    Malika

    "" The thread has been moved to Forum Home "database" SQL and PL/SQL+.

    Nicolas.

  • How to use a table in a SQL query

    Hello

    I need to use a table of numbers as a VARRAY or table of associated Index so that I can do the following SQL code:

    Select *.
    of *.
    where the array is null or id is in table

    So that if the array is empty it returns all the records, and if the table is not empty, then it will return only the rows associated with the ID of the table.

    Is this possible?

    Kind regards

    Nestor Boscan

    In fact, solution I posted returns all rows when VARRAY is empty, not when it is null. To return all the rows when VARRAY is null, use:

    SQL> select  ename
      2    from  emp
      3    where deptno in (select * from table(cast(sys.OdciNumberList(10,30) as sys.OdciNumberList)))
      4       or sys.OdciNumberList(10,30) is null
      5  /
    
    ENAME
    ----------
    ALLEN
    WARD
    MARTIN
    BLAKE
    CLARK
    KING
    TURNER
    JAMES
    MILLER
    
    9 rows selected.
    
    SQL> select  ename
      2    from  emp
      3    where deptno in (select * from table(cast(null as sys.OdciNumberList)))
      4       or null is null
      5  /
    
    ENAME
    ----------
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    
    ENAME
    ----------
    JAMES
    FORD
    MILLER
    
    14 rows selected.
    
    SQL> 
    

    SY.

  • How to know the status of the process flow using a SQL query

    Hello
    I want to know the final status of a process flow after execution by using a sql query?

    The available entries are:
    -Item_Key
    -Process_Flow_Package_Name
    -Process_Flow_Name

    I ran the process flow using a WF_Engine.LaunchProcess ()procedure, but I was not able to know the status of the process flow.


    Is it possible to know the status of the process flow?

    using a procedure or an sql query?

    Thanks in advance,
    SriGP.

    Once the process is completed, or not, you can see the status by calling:

    UAS (your_OWF_shema) .wf_engine. ItemStatus()

  • Several items with the PHP URL parameter

    Hi, I am a novice PHP, using dreamweaver only do any programming. I have a page showing 10 products, and within each product, I have a checkbox dynamic named "checkbox" which is linked to the product id. When the user selects multiple checkboxes, I want to display the results on the results page by using a URL parameter. I can get the page to send the url like this:

    CheckBox.php? CheckBox = 100000 & Case = 100100 & box = 100200 & box = 100300 & box = 1010 23Submit = Submit

    I can't figure out how to get more than one display item. I searched and read countless forum entries, but nothing I can work with.

    Here is the form on the home page;
    < do action = "checkbox.php" method = "get" name = "checkbox" > "
    < input type = "checkbox" name = "checkbox" value = "<?" PHP echo $row_rs_products ["Item"];? ">" / >

    On the checkbox.php page, the recordset is:

    SQL: SELECT *.
    PRODUCTS
    WHERE Item = 'products '.
    ORDER BY point CSA

    Variables:
    name of column-$1 _GET ['checkbox']

    Any help is appreciated.
    Thank you
    Roger

    huntlok1 wrote:
    > I get the page to send the url like this:
    >
    > checkbox.php? checkbox = 100000 & = 100100 checkbox checkbox = 100200 & checkbox = 100300 & che
    > ckbox = 101023Submit = Submit
    >
    > I can't figure out how to get more than one display item.

    It's like saying: I'll have a beer. No, I'm getting red wine. No, I'll
    have a cherry brandy. Uh, no, make it a flaming lamborghini.

    Each variable must have a different name. Otherwise, the last one being always
    WINS.

    Since you're using PHP, change the name of your boxes something
    like products []. The empty pair of brackets turn products into
    a table. In your page, you must then activate the table in
    something that your recordset can use.

    > On the checkbox.php page, the recordset is:
    >
    > SQL: SELECT *.
    > From products
    > WHERE Item = 'products '.
    > ORDER BY point CSA

    $products = implode (',', $_GET ['products']);

    SELECT *.
    PRODUCTS
    WHERE point IN ($products)
    ORDER BY point CSA

    --
    Adobe Community Expert David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Report with the sql query area

    Hello

    I have a region in relation to the sql query. There are two regions in the page. Top of page, the user enters data and after that second data enterd to see the region, which is related region
    based on a sql query.

    Now, when this page is opned, because the user has not entered anything, region report shows the message "no data found". Is it possible to remove this message or
    may I have conditionally disaply region report IE if data are inserted only region report is dispalyed.

    Thank you

    Hello

    You can use conditions for example "Exists (SQL query returns at least one row).

    Kind regards
    Jari

  • '||' Operator in the sql query

    Hi all
    We use the "|" operator in the sql query. Under the terms of the performance, it's beneficial or not?
    Please suggest me.

    Select * from EMP
    where (ename | empno) in ('xxx' | 'yyyy')


    Thanks in advance...
    Select * from emp
    where (ename||empno) in ('xxx'||'yyyy')
    

    What is the reason using the ' |'?

    Similar results could be achieved by article AND only

    Select * from emp
    where ename = 'xxx'
    and empno = 'yyyy'
    
  • Dependencies of object database by using the SQL query?

    Hi guys,.

    I just see the nice feature to discover the database object dependencies in the APEX (generator application-> app 123-> utilities-> database object dependencies).

    Is there a way to get this dependencies just with a SQL query? Also should I calculate a process in order to get the current dependencies? In APEX, you press a calculate button before you can see the dependencies.

    Thanks in advance and greetings from the Germany

    Steven

    After you import the app Builder application APEX 4500, I saw that the Start button the following process:

    wwv_flow_theme_manager.find_object_dependencies (p_flow_id =>: fb_flow_id, p_page_id-online null);

    In my example I can't use it, only the APEX_050000 user has privileges to use, and you must grant the privileges of your schema, so if you want to use it inside your application. My application must be independent of the schema and the specific database.

    Also it is not recommended to use this procedure because it is one of the procedures not supported that are only used by oracle.

  • How to select only the part by using the sql query

    Hello

    I have the task to retrieve only the integral of the input text by using the sql query.

    The entry is as follows

    Entry for the price setting

    $12.5 (FYI without space)

    $ 12.5 (FYI single space)

    $ 12.5 (double space FYI)

    $12.5 (FYI multiple space)

    $12.5 (FYI multiple space)

    Output expected of 12.5

    The price is the type varchar2 column in the store_price table.

    Please let me know how to achieve this.

    Thanks in advance.

    If this is always the case that you get a $ followed by a number of places, you can use something like:

    Select to_number (ltrim ('$ 12.5',' $')) DOUBLE

    or

    SELECT ltrim ('$ 12.5',' $') OF double

    but take care of your nls_numeric_character settings if they are defined so that, for example, a comma is the decimal separator, you will have a problem.

    HTH

  • Can I use session variables in data model BI publisher SQL query?

    Hi Experts,

    We apply security at the level of the BI Publisher 11g data.

    In OBIEE we do so using session variables, so I wanted to just ask if we can use the same session variables in BI Publisher as well
    That is, we can include a where clause in the SQL for the sample data as

    Where ORG_ID = @{biServer.variables ['NQ_SESSION.]} {[INV_ORG']}

    I would like to know your opinion on this.

    PS: We implement security EBS r12 in BI Publisher.

    Thank you

    Read this-> OBIEE 11 g: error: "[nQSError: 23006] the session variable, NQ_SESSION.» LAN_INT, has no definition of value. "When you create a SQL query using the session NQ_SESSION variable. LAN_INT in BI Publisher [ID 1511676.1]

    Follow the ER - BUG: 13607750 -NEED TO be able TO SET up a SESSION IN OBIEE VARIABLE AND use it IN BI PUBLISHER

    HTH,
    SVS

  • use a SQL query in a backing bean

    Hello

    I would like to know how to run an SQL query in a method of bean to support, what is the code I tried, its purpose is to fill in the field "cin" with data from my database, here is the Code:

    public String cb2_action() {}
    BindingContainer links = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding ("CreateInsert");
    Object result = operationBinding.execute ();
    If (! operationBinding.getErrors () .isEmpty ()) {}
    Returns a null value.
    }
    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get ("PersonneView1Iterator");
    Line row = dciter.getCurrentRow ();
    Statement stmt = this.getDBTransaction () .createStatement (1);
    try {}
    ResultSet rs = stmt.executeQuery ("select max (cin) person");

    While {(rs.next ())}

    row.setAttribute ("cin", rs.getInt (1) + 1);
    }
    } catch (SQLException ex) {}
    ex.printStackTrace ();
    }
    return 'go. '
    }

    at runtime, it gives an error on this line: statement stmt = this.getDBTransaction () .createStatement (1);

    Please check and correct me

    Thanks in advance

    Hello

    Initially, I want to say that this should not be used if you try to get a PrimaryKey that would create serious concurrency problems.

    For example, lets say you want when you create a new employee to define its equal to the max Department DepartmentId.

    We could create a readOnly VO (lets call it MaxDepartmentId) with a query that returns the departmentId max:

    select max(Department_Id) as maxDep from Departments
    

    After that, he must add the VO of MaxDepartmentId as a ViewAccessor in our Vo employees,
    Override the create() method in the EmployeesRowImpl and add the code like this:

    public class EmployeesRowImpl extends ViewRowImpl {
        @Override
        protected void create(AttributeList attributeList) {
            Row r=getMaxDepartmentId().first();
            if(r!=null){
                 Number max=(Number)r.getAttribute("Maxdep");
                 attributeList.setAttribute("DepartmentId", max);
            }
            super.create(attributeList);
        }
    }
    

    That's all.
    If you run this, you'll see that when you create a new employee, it has a default value.

    Gabriel.

  • 'Function SQL Query return' using with Flash graphics

    I created a pl/sql function that returns a SQL query in a varchar2 of this form:

    Select the null link
    -value > < x value
    < value y of Series1 > series 1 label
    < value Series2 y > 2 series label
    < value of y Series3 > series 3 Label
    ...
    ...
    from tablea a
    Join tableb b
    On a.col = b.col
    order of < x value >

    If I call the function of a graphic Flash box series SQL with the Type of Source query "SQL query" value that returns the function like this:

    return functionname (to_date ('30-sep-2010, ' mon-dd-yyyy ""))

    It parses correctly and the page is saved; However, when I run the page I get no output - error messages or another indication of a problem.

    Now, if I call the function in a SQL client, capture the result of the query SQL using the dbms_output and paste that into the box graphic Flash series SQL - change the Source Type of SQL query query - and save the page it works fine when I run it and returns a chart series flash.

    Can anyone suggest either;

    1. what I might have missed or done wrong?
    2. a way to effectively diagnose the problem...

    I tried to use the debugger Apex - what is very nice, indeed - but it provides no information on what might be my problem. I tried to write my own my function debug messages using the apex_debug_message package - nothing...

    Thank you
    Eric

    Hi Eric,.

    Try to pull the source like this:

    begin
       return functionname(to_date('30-sep-2010', 'dd-mon-yyyy'));
    end;
    

    This works very well for me, and if I take the begin-end and the final semicolon from the return statement I get the same behavior as you.

    He doesn't mention in aid of the source (only during the wizard if) this source type must be expressed in this way, but I agree, it would be useful that the tool would validate to this format meets it "Query SQL that returns the function" or give some sort of indication of the sentence. In any case, this should help you will again.

    Hope this helps,
    John

    If you find this information useful, please do not forget to mark the 'useful' or 'correct' post so that others benefit as well.

  • Performance problem on the SQL query that does not use the primary key index

    Hello!

    I have some performance issues on a single SQL query (Oracle 10 g).
    I could solve the problem by using the INDEX indicator, but I would like to know WHY this is happening.

    * Tables *.
    create table jobs)
    ID number (5) not null,
    name varchar2 (100),
    primary key constraint Job_PK (id)
    )
    /
    -Record count: 298

    create table Comp)
    integer ID not null,
    name varchar2 (100),
    primary key constraint Comp_PK (id)
    )
    /
    -Record count: 193

    -Relation m: n
    create table JobComp)
    integer ID not null,
    id_job integer not null,
    id_comp integer not null,
    primary key constraint JobComp_PK (id),
    unique key constraint JobComp_UK (id_job, id_comp),
    Constraint JobComp_FK_Job foreign key (id_job) refers to Job (id),
    Constraint JobComp_FK_Comp foreign key (id_comp) makes reference Comp (id)
    )
    /
    create index JobComp_IX_Comp on JobComp (Cod_Comp)
    /
    create index JobComp_IX_Job on JobComp (Cod_Job)
    /
    -Record count: 6431

    * Ask *.

    When I run this query, the execution plan shows the index using (JobComp_PK and JobComp_IX_Comp).
    No problem.

    Select JobComp.*
    of JobComp
    Join jobs
    on Job.id = JobComp.id_job
    where JobComp.id_comp = 134
    /
    -runs in 0.20 sec

    But when I add the field 'name' of the work table the plan uses full access table to the table of work

    Select JobComp.*, Job.name
    of JobComp
    Join jobs
    on Job.id = JobComp.id_job
    where JobComp.id_comp = 134
    /
    -runs in the 2.70 dry

    With the help of the index

    Select / * + INDEX (Job Job_PK) * /.
    JobComp.*, Job.name
    of JobComp
    Join jobs
    on Job.id = JobComp.id_job
    where JobComp.id_comp = 134
    /
    -runs in 0.20 sec

    * Doubt *.

    This behavior is correct?

    PS. : I tried to recalculate the statistics, but nothing changes:

    analyze the job calculation table statistics.
    /
    change the statistical calculation of index Job_PK reconstruction;
    /
    Start
    dbms_utility.analyze_schema (sys_context ('userenv', 'current_schema'), 'CALCULATE');
    end;
    /

    [of]
    Gustavo Ehrhardt

    Gus.EHR wrote:
    Hello.
    I'm sorry for the plan unformatted.
    The execution time of the querys "without field name' and 'with the field name with suspicion" are equal.
    He has no problem caching, because I get the plans of the sequence different from the querys and repeated the performance. The result is always the same.

    I don't think that there is no problem with oracle crossing LOOP IMBRIQUEE to the HASH JOIN when you include the field name and this should be the expected behavior. But it seems that your WORKING table has a degree of parallelism set against what is causing the query to run in parallel (as JOB table is now available with full table scan, instead of indexed access earlier). It could be that the parallel execution is contributor to extra Runtime.
    (a) do you know why the degree of parallelism on the WORK table has been defined? Do you need it?

    You can see if the following query provides a better response time?

    select /*+ NOPARALLEL(JOB) */ JobComp.*, Job.Name
      from JobComp
      join Job
        on Job.id = JobComp.id_job
     where JobComp.id_comp = 134
    
  • Dealing with a URL parameter to be used for a default value

    I have a page of results of detail (the CONTACTS Table Recordset), identified by the CONTACTID

    In the same page, I also have another dynamic relational table, showing all the associated notes that contact record (recordset CONTACTNOTES identified using CONTACTS. CONTACTID = CONTACTNOTES. NOTESCONTACTID)

    It works fine and I can update CONTACTS without any problem.

    My problem is to insert a new record CONTACTNOTES (of a simple URL link) also associated with the same record.

    The primary field (NOTEID) is an AutoNumber but I need to carry out CONTACTS. CONTACTID variable to use as the default value for the CONTACTNOTES url. NOTESCONTACTID.

    I think something like that...

    in the dynamic table on the initial results page, using (/ insertnote.php?) CONTACTID = <? PHP echo $row_recordlookup ["NOTESCONTACTID"];? >) as the link, setting the URL parameter.

    The page insertnote has a recordset insert form, related to the CONTACTNOTES table.

    Now, I don't know how to add this URL parameter as the default field value. Is it as simple as putting the $HTTP_GET_VARS ["CONTACTID"] in the field of the Init val in the property inspector?

    Sorry - worked on...

    On the new page of note insertion, I first created a Recordset, duplicate on the initial results page.

    When you create the form, it was easy then to insert {CONTACTS. CONTACTID} as a default value.

Maybe you are looking for

  • Qosmio F20-136 for Linux Suse 10 tv tuner drivers

    Hello Anyone know where I can find the linux drivers for F20-136 tv tuner? I understand that the Qosmio Player is based on linux, so presumably they do, but I couldn't find them. Ideally, I'm after Suse 10 compatible drivers. Thank you

  • Hewlett Packard jet 7: safe mode froze my screen

    If I put my tablet on safe mode, and it froze all of a sudden my tablet, I could not connect so I did a hard reset thinking it would change but it has still not ATM, I'm a little BP because I was told it was a good product. Now, I spent $119 on a pro

  • Envoy in the phone to apple for repairs by mail

    How much time does it take for apple repair your phone? I sent my iPhone 6 more for problems with not wanting to stay on. It was like it since I bought the phone new Verizon.

  • WRT54GS2 wireless problem

    So I had a problem with a big month old WRT54GS2. The problem is since I've owned the router, but it has recently worsened. Approximately every 20 to 30 minutes or so, my router connection will drop to 54 Mbps and go slowly down to 24 Mbps, until he

  • Change of domain alias name

    so...  What is the point of alias of the device again? After you have created a few areas, I noticed in my VNX is not enumerate ports in the way I thought it would be.   Port 0 of the slot 2 SPA shows like "A-4", while I made an alias domain called "