By using the link in the column to pass column values
Hello
I have a link to the column in my report which opens a modal page, now I want to use the value of the column clicked in the page that opens.
I don't want to put any article on the opening page of the column value of click rather I want to use the value of the column of the click in my sql query.
for example:
1 P1 has the report < column link by clicking on it opens P2 >
2. on page 2, I want to use the value of the clicked column.
So far, I did
1 link to page 2
2. ask - #column_value_clicked #.
3. in the sql query, I use the same above in the where clause.
Any help...
Thank you
Rakesh
fac586 wrote:
Sunil Bhatia wrote:
Hi Rakesh,
Make use of x 01 parameter included in apex 5.0
You can create a URL to page 1 as:
f? p = 103:1:3241341234123: & x 01: #column_value_clicked #.
Make use on request P2 in the form:
Select * from test_table where id = APEX_APPLICATION. G_X01;
You have not tested who, did you?
I tested it buddy.
Link https://apex.oracle.com/pls/apex/f?p=56971
Click any bar chart and then wait that he freshen up.
Click on report of ENAME and see that he went through the parameter.
Report URL: f? p = 56971:2: & APP_SESSION. : No.: & x 01 = #ENAME #.
-Sunil Bhatia
Tags: Database
Similar Questions
-
convert the column values to a single line...
I have to return the column values to a single line separated by commas.
If the nulls in the column just ignore without a comma.
Here is one for example. There are three values and two NULL values in the table
Help, pleaseSQL> select ID from temp_fa; ID ----- 1 2 3 5 6 rows selected. I am expecting an output as 1,2,3,5
There is always more than one title in the Oracle world ;)
You can use the TRIM, for example (same configuration as your example):hoek&XE> create table t as select level col from dual connect by level <= 6; Tabel is aangemaakt. hoek&XE> update t set col = null where col in (1,3,5); 3 rijen zijn bijgewerkt. hoek&XE> select * from t; COL ---------- 2 4 6 6 rijen zijn geselecteerd. hoek&XE> select ltrim(sys_connect_by_path(col, ','), ',') output 2 from ( select col 3 , row_number() over (order by col) rn 4 from t 5 ) 6 where connect_by_isleaf=1 7 start with rn=1 8 connect by rn = prior rn+1; OUTPUT ------------------------------------------------------------------------------------------------------------- 2,4,6,,, 1 rij is geselecteerd. hoek&XE> select trim ( both ',' from sys_connect_by_path(col, ',')) output 2 from ( select col 3 , row_number() over (order by col) rn 4 from t 5 ) 6 where connect_by_isleaf=1 7 start with rn=1 8 connect by rn = prior rn+1; OUTPUT ------------------------------------------------------------------------------------------------------------- 2,4,6 1 rij is geselecteerd.
-
How to use the Type of Oracle Table values in the Select statement.
Hello
I get the initial set of values in the Table of Type Records of the Oracle and want to use the list of values in the Select statement.
For example, try something like the following:
TYPE t_record () IS RENDERING
ID TABLEA.ID%type,
NO TABLEA.NO%type
);
v_record t_record;
T_table TYPE IS the v_record TABLE % TYPE;
v_table t_table;
-Code to fill the values of v_table here.
SELECT ID, NO, COLLECT in BULK IN < some other table variabes here > FROM TABLEA
WHERE ID IN (i) v_table USER.USER;
I want to know how to use the Type of Oracle Table values in the Select statement.Something like this:
create or replace type t_record as object ( id number, no number ) / CREATE or replace type t_table AS TABLE OF t_record; / set serveroutput on declare v_table t_table := t_table(); v_t1 t_table := t_table(); begin v_table.extend(1); v_table(1).ID := 1; v_table(1).No := 10; v_table.extend(1); v_table(2).ID := 2; v_table(2).ID := 20; SELEC t_record (ID,NO) BULK COLLECT INTO v_t1 from TableA FROM TABLEA WHERE ID IN (select t.ID from table(v_Table) t); for i in 1..v_t1.count loop dbms_output.put_line(v_t1(i).ID); dbms_output.put_line(v_t1(i).No); end loop; end; /
No test!
P;
Published by: bluefrog on March 5, 2010 17:08
-
Convert the column values into buckets
Hello
Please help me to convert the column values into buckets.
I have the values of the columns in the following way.
Age of Orderdate * 9 10 12 14 15 18 19 20 21 22 26 27 28 29 33 34 40 45 * and so on
But the requirement is the column values should be displayed in form
Age by order date * 15 1 2 3 4 5 6 7 8 9 10 11 - 16-20 21-25, 26-30 30 + *.
Please someone give me the solution.
Thanks in advance.
Hervé RamaHi Richard,
Just to double check, you have Setup buckets for 1, 2, 3, 4, 5, 6, 7 and 8 individually (each with a fair value). The problem is that you simply do not have all data fall into buckets above, correct?
If this is the case, it looks like has been answered your original question. If so, the label would assign 'Proper' points by clicking on the button label correct next to the appropriate response and open a new thread with your new question. The reason why I say this is it will help other people who have a similar bucket question to your solution, without complicating the issue with subsequent questions.
If you can post a separate thread, I'd be more than happy to help you with your secondary problem.
Best regards
-Joe
-
In Oracle SQL, select cannot use the column in the statement and order of
Hello
Is there a work around for this.
Thanks in advance
Pablo.Hello
943981 wrote:
Hi allThis is the error I get:
ORA-00960: column ambiguous naming in select list
00960 00000 - "ambiguous column naming in select list".
* Cause: A column name in the order by list corresponds to more than a select
columns in the list.
* Action: Delete columns duplicated naming in the selection list.
Error on line: column 6:17This error message seems pretty clear to me. What don't you understand?
Or the other
(a) use aliases, so each column has a unique name, or
(b) remove the columns duplicated of the SELECT clause.Post your query. It is difficult to tell exactly what you're doing wrong when we do not know exactly what you are doing.
For best results, view a complete test (including CREATE TABLE and INSERT statements) script, if necessary that people can to recreate the problem and test their ideas.
See the FAQ forum {message identifier: = 9360002} -
How to create the Table using the column Drag and Drop feature
Hello:
I'm new to Data Modeler tool Oracle SQL dev and would like to know if there is a way to create a new table by reusing existing columns or groups of columns. The idea is to maintain consistency and save time of table design. If the columns created previously can be reused and require, drag and drop column in the right pane, then only new columns must be created manually.
Any thoughts on this will be appreciated.
Thank you!Yes - just change the name of the model table in the script (t_name = "table_template") then save this new transformation for later use.
I don't know how to apply only some of the tables. Seems like something you could do to a secondary view level?
Perhaps someone else on the forum can advise how to change the script to work on a subview only instead of the whole model.
-
Using the column in the Merge of Oracle statement and column name not valid
Hello
I have the database table called ecp_blobdata with the following description of the table:
I implemented the following statement from Oracle FUSION to refresh this table:OBID VARCHAR2(24), ZBINDATA LONG, ZLEN INTEGER
However, I get the following error message when I try to compile the package:MERGE INTO ecp_blobdata ecbl USING rnlht1m4.zbindb@TCPROD bin ON (ecbl.obid = bin.obid) WHEN MATCHED THEN UPDATE SET ecbl.obid = bin.obid, ecbl.zbindata = bin.zbindata, ecbl.zlen = bin.zlen WHEN NOT MATCHED THEN INSERT VALUES(ecbl.obid, ecbl.zbindata, ecbl.zlen); COMMIT;
The column defintely exists, but I don't know why he keeps complaining with the same error message? It's to do with the help of column which is zbindata or something else that I might not be looking at?Compilation errors for PACKAGE BODY BHALLAR.DATA_REFRESH Error: PL/SQL: ORA-38101: Invalid column in the INSERT VALUES Clause: "ECBL"."OBID" Line: 13 Text: MERGE INTO ecp_blobdata ecbl Error: PL/SQL: SQL Statement ignored Line: 13 Text: MERGE INTO ecp_blobdata ecbl
Thank you.G ' Day
Your syntax is incorrect.
In the list of VALUES, you should refer to your table in the source columns, alias 'bin '.
That is to say, precise cause number error message in the documentation:
Cause: INSERT fact VALUES clause references columns in the destination tableSW
-
Mark from a table where the column value is a colon-delimited list
Version: Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
Hello
This is a new query of a query Frank helped me with:
Demand is all users to restrict the report based on a multiple selection on the front-end server (application APEX) filter.
The filter returns that a colon-delimited list and the data in the table can be saved in a delimited by a colon list too. There may be 1 to n values (up to 4000 characters).
I need a WHERE clause that will allow a match, if it exists, between the data in the column of the Table and the Mult-selection list filter.
The abbreviated for this post query would be something like:
SELECT slt_id, slt_item, slt_owner
OF slt_dashboard
WHERE slt_owner IN (colon delimited page list);
The Create Table and Insert statements:
CREATE TABLE slt_dashboard ( dashboard_id NUMBER, slt_id VARCHAR2(10), slt_item VARCHAR2(2500), slt_owner VARCHAR2(4000), slt_type VARCHAR2(25), slt_year NUMBER, parent_id NUMBER ); --Insert slt_dashboard INSERT INTO slt_dashboard(dashboard_id,slt_id,slt_item,slt_owner,slt_type,slt_year,parent_id) VALUES (12,'1.1','Implement revenue enhancement initiatives','E15889:JPARISI:BDUR63','Business Commitment',2014,6); INSERT INTO slt_dashboard(dashboard_id,slt_id,slt_item,slt_owner,slt_type,slt_year,parent_id) VALUES (13,'1.2','Strengthen our Energy position','KVROMAN','Business Commitment',2014,6);
I have a function to separate the list delimited by two points in a table for the IN clause, but because these values can be saved in a delimited list of Colon in the column of the Table, I have a problem, being able to analyze the data in the column, AND the filter data.
The function is:
CREATE OR REPLACE FUNCTION get_list( p_string IN VARCHAR2 ,p_delimiter IN VARCHAR2 DEFAULT ':' ) RETURN vc_array_1 PIPELINED IS l_string VARCHAR2( 32000 ); l_array wwv_flow_global.vc_arr2; BEGIN l_array := APEX_UTIL.string_to_table( p_string ,p_delimiter ); FOR i IN l_array.FIRST .. l_array.LAST LOOP PIPE ROW ( TRIM( l_array( i ) ) ); END LOOP; RETURN; END;
The function called in the query in the form (it's just for reference in case someone wanted to know):
SELECT ... FROM ... WHERE slt_owner IN (SELECT * FROM TABLE( get_list( :P115_SLT_OWNER ) ));
But I can't use this approach because the data in the Table can be saved in a delimited list of Colon too.
Desired output:
If the Mult-Select list filter contains: E15889:JPARISI then
1.1 implementation of the E15889 revenue improvement initiatives; JPARISI (it's a semicolon between the names)
If the multiple-selection list filter contains: KVROMAN then
1.2 strengthen our position of energy KVROMAN
If the multiple-selection list filter contains: BDUR63:KVROMAN then
1.1 implementation of the BDUR63 revenue improvement initiatives
1.2 strengthen our position of energy KVROMAN
Please let me know if something is not clear.
Thank you
Joe
I went to approach the Table and the Page works perfectly.
Thank you to everyone!
Thank you
Joe
-
Update the column values with the new user who has changed the data in the current line
I have a table, the following structure.
CREATE TABLE FILTERCALENDAR1
(DATE OF THE "C_DATE',
NUMBER (1,0) 'DAY_OF_WEEK ',.
NUMBER (1.0) "WEEK_WINDOW."
NUMBER (1.0) "MONTH_WINDOW."
NUMBER (1.0) "YEAR_WINDOW."
NUMBER (1.0) "DATE_YEAR_WINDOW."
NUMBER (1.0) "ONCE_WINDOW."
VARCHAR2 (25 BYTE) "USERNAME."
"LASTUPDATED" DATE
);
Problem:
If a user changes the value of one of the columns I want to write his name to user and sysdate in the 'USERNAME' and LASTUPDATED' columns.
* Tried: *.
I tried an update trigger for this problem, but I get an error table mutation.
The one you suggest how can I achieve this.
ConcerningUse BEFORE the UPDATE trigger
CREATE OR REPLACE TRIGGER myTrigger before UPDATE ON FILTERCALENDAR1 FOR EACH ROW BEGIN :new.USERNAME := user; :new.LASTUPDATED := sysdate; END;
-
Select only records where the column values are not all equal to zero
Hi everyone, it seems so easy, but it has left me speechless on the research in a way that is clean, easy to achieve. I know when someone replies, I'm going to kick me. So, let's assume this is what I have:
I need an external application around it or something which will select only 'Type 1'... that is, if all months are each equal to zero, do not include the record in the result set.with mytable as ( select 'Type 1' as itemtype, 'JAN' as monthname, 0 as theval from dual union all select 'Type 1' as itemtype, 'FEB' as monthname, 1 as theval from dual union all select 'Type 1' as itemtype, 'MAR' as monthname, 5 as theval from dual union all select 'Type 1' as itemtype, 'APR' as monthname, 1 as theval from dual union all select 'Type 1' as itemtype, 'MAY' as monthname, 4 as theval from dual union all select 'Type 1' as itemtype, 'JUL' as monthname, 0 as theval from dual union all select 'Type 1' as itemtype, 'AUG' as monthname, 0 as theval from dual union all select 'Type 1' as itemtype, 'SEP' as monthname, 1 as theval from dual union all select 'Type 1' as itemtype, 'OCT' as monthname, 7 as theval from dual union all select 'Type 1' as itemtype, 'NOV' as monthname, 1 as theval from dual union all select 'Type 1' as itemtype, 'DEC' as monthname, 2 as theval from dual union all select 'Type 2' as itemtype, 'JAN' as monthname, 0 as theval from dual union all select 'Type 2' as itemtype, 'FEB' as monthname, 0 as theval from dual union all select 'Type 2' as itemtype, 'MAR' as monthname, 0 as theval from dual union all select 'Type 2' as itemtype, 'APR' as monthname, 0 as theval from dual union all select 'Type 2' as itemtype, 'MAY' as monthname, 0 as theval from dual union all select 'Type 2' as itemtype, 'OCT' as monthname, 0 as theval from dual union all select 'Type 2' as itemtype, 'NOV' as monthname, 0 as theval from dual union all select 'Type 2' as itemtype, 'DEC' as monthname, 0 as theval from dual ) select itemtype, sum (case monthname when 'JAN' then theval else 0 end) as JAN, sum (case monthname when 'FEB' then theval else 0 end) as FEB, sum (case monthname when 'MAR' then theval else 0 end) as MAR, sum (case monthname when 'APR' then theval else 0 end) as APR, sum (case monthname when 'MAY' then theval else 0 end) as MAY, sum (case monthname when 'JUN' then theval else 0 end) as JUN, sum (case monthname when 'JUL' then theval else 0 end) as JUL, sum (case monthname when 'AUG' then theval else 0 end) as AUG, sum (case monthname when 'SEP' then theval else 0 end) as SEP, sum (case monthname when 'OCT' then theval else 0 end) as OCT, sum (case monthname when 'NOV' then theval else 0 end) as NOV, sum (case monthname when 'DEC' then theval else 0 end) as DEC from mytable group by itemtype order by itemtype
In summary to get a total of zero is not an option, because I could have-15 and + 15 in different columns, in which case, the recording should be displayed.
Something as simple as... 'not the case (oct = 0 and 0 nov and dec = 0...) at the end is all it seems to me necessary. I thought to add a case for each column clause, but that seems not very effective. Ideas?
Thanks in advance!
Mark
Edit... I know not what follows will work using the MINUS operator, but my actual query is really huge, and I don't want to have to write it twice...
{code}
Select
ItemType,
sum (case monthname when "JAN" then Val else 0 end) such as JAN,.
sum (case when monthname 'FEB', then Val 0 otherwise end) by Feb.
sum (case when monthname 'MAR', then Val 0 otherwise end) like MARS,
sum (case monthname when "APR" then Val else 0 end) as APR.
sum (case when monthname 'MAY', then Val else 0 end) either.
sum (case when monthname "JUN", then Val 0 otherwise end) as JUN.
sum (case monthname when "JUL" then Val else 0 end) as JUL,.
sum (case monthname when "AUG" then Val else 0 end) as AUG.
sum (case monthname when "MS" then Val else 0 end) as MS.
sum (case monthname when "OCTS" then Val else 0 end) OCT.
sum (case monthname when "NOV" then Val else 0 end) as NOV.
sum (case monthname when 'DEC' then Val else 0 end) as DEC
FROM MyTable
Group of itemtype
less
Select
ItemType,
Jan, Feb, mar, Apr, may, June, July, August, Sept, oct, nov, dec
de)
Select
ItemType,
sum (case monthname when "JAN" then Val else 0 end) such as JAN,.
sum (case when monthname 'FEB', then Val 0 otherwise end) by Feb.
sum (case when monthname 'MAR', then Val 0 otherwise end) like MARS,
sum (case monthname when "APR" then Val else 0 end) as APR.
sum (case when monthname 'MAY', then Val else 0 end) either.
sum (case when monthname "JUN", then Val 0 otherwise end) as JUN.
sum (case monthname when "JUL" then Val else 0 end) as JUL,.
sum (case monthname when "AUG" then Val else 0 end) as AUG.
sum (case monthname when "MS" then Val else 0 end) as MS.
sum (case monthname when "OCTS" then Val else 0 end) OCT.
sum (case monthname when "NOV" then Val else 0 end) as NOV.
sum (case monthname when 'DEC' then Val else 0 end) as DEC
FROM MyTable
Group of itemtype
)
where (oct = 0 & nov = 0 and dec = 0 and jan = 0 and 0 = Feb and mar = 0
apr = 0 and may = 0 and = 0 jun and Jul = 0 and aug = 0 and Ms = 0
)
order of itemtype
{code}
Change again... OK, I guess that I am answering my own question here, but I think that by using a WITH to write the main request once clause and then selecting * twice using the MINUS operator between where the second query is where (oct = 0, etc.) is what I need. If anyone has better suggestions, please let me know! Here's the logic of nickname for what I come up with to date...
{code}
WITH mainquery as (select all)
Select * from mainquery
less
Select * from mainquery where (oct = 0, nov = 0, etc...)
{code}
Thanks again!
Mark
Published by: user455268 on March 1, 2012 19:13
Published by: user455268 on March 1, 2012 19:16Hello
You can do it with a HAVING clause:
select itemtype, sum (case monthname when 'JAN' then theval else 0 end) as JAN, sum (case monthname when 'FEB' then theval else 0 end) as FEB, sum (case monthname when 'MAR' then theval else 0 end) as MAR, sum (case monthname when 'APR' then theval else 0 end) as APR, sum (case monthname when 'MAY' then theval else 0 end) as MAY, sum (case monthname when 'JUN' then theval else 0 end) as JUN, sum (case monthname when 'JUL' then theval else 0 end) as JUL, sum (case monthname when 'AUG' then theval else 0 end) as AUG, sum (case monthname when 'SEP' then theval else 0 end) as SEP, sum (case monthname when 'OCT' then theval else 0 end) as OCT, sum (case monthname when 'NOV' then theval else 0 end) as NOV, sum (case monthname when 'DEC' then theval else 0 end) as DEC from mytable group by itemtype HAVING MIN (theval) != 0 OR MAX (theval) != 0 order by itemtype ;
If the values are all 0, then the MIN and MAX will be 0.
If the MIN or MAX is not 0, the values are all 0.This assumes that the combination (itemtype, monthname) is unique, because it is in your sample data.
If this is not the case, start with a subquery that GROUPs BY itemtype, monthname, so that when you get to the main request, this combination will be unique. -
Hello
I use JDev 11.1.1.3
I have a form and a table in the form of my jspx
in my table, I have a column that is not bound 2 DB
in my form, I have a class LOV where I apply value change listener...
When I apply value change listener I want 2 set the value of the column...
Please suggest me a solution
Thanks in advance
Edited by: Venkat Naidu L on March 15, 2011 22:06Try and tell. This should be in quotes. But while coding won't give you any error during compiling.
Reg,
Vini -
Can be passed to the formula of the procedure/function the column value?
Cf_value is back after some calculation using the main request.
Can be passed directly the value of column of formulas of procedure without assinged to placeorder?
as below...
f_convert(:cf_value,new_value);
---------------------------------------------------------------
My procedure is...
PROCEDURE f_convert (val1 val2 in number, number) IS
BEGIN
val2: = val1 * 100;
END;
If anyone knows pls answer me...In fact, if there is that other calculations he (in Proceudre)
Can I used is like below?
---
PROCEDURE f_convert (val1 val2 in number, number) ISBEGIN
val2: = val1 * 100;
return (val2);
END;
----A procedure cannot return a value, the return in my previous post clause was part of the function for formula column.
Let's say you have a column of forms of so-called CF_2, then the function because it will be like:function cf_2formula return number is val1 number; val2 number; begin val2 := :cf_1 * 100; -- or val2 := val1 * 100 --parameters not allowed in formula column function -- All the other code that you need inclusive of calling function, procedure as in any PL/SQL block can be placed return (val2); end;
Any calculation can be used in the service of the formula column
-
using the button to select distinct values
I would like to have a button where a user can choose one of four options: 6, 12, 18, 24. I updated the properties of force and I changed the labels so that it looks only four options are available but it always allows me to choose between 6 to 24 in 1 increments. I used an indicator to see what data are produced by the control and it shows also from 6 to 24 with increments of 1. Am just using the wrong control?
You can use text labels. Right click on the Select button. Right click again and create the visible text display. You can then right-click on the display of text labels and select "edit items". Add as many items as you want and to assign a digital specific to each label, uncheck the box for sequential values.
-
JavaScript to set radio button choices using the drop-down list box value.
I use Adobe Acrobat Pro DC version 2015.016.20039 on a MacBook Pro OS X El Capitan version 10.11.6.
I have a set of named CitBox radio box choices. I'm defining what choice is selected from out of a drop-down list named AppCitizenship box. Both of them have six choices with values of 1, 2, etc. (I thought having the same values would make easier the translation from one to the other). Thanks in advance.
If you used the same values, then it is pretty easy. Just use this code as the validation script custom field drop-down list:
this.getField("CitBox").value = event.value;
-
Compare the column values for multiple lines
I am new to oracle and I have a requirement to compare the values of column across multiple lines. If all column values are the same, I want to display that value, if the columns are not the same, I need to display 'no match' as value. I need id to group values and display a status value based on the above logic. Can anyone offer assistance with dispalying the result expected below?
Sample
Table
State ID
1 S
2 L
1 S
2 S
expected results
State ID
1 S
2 no match
Hello
That's what you asked for:
SELECT id
CASE
WHEN COUNT (DISTINCT status) > 1
THEN "no match."
For ANOTHER MIN (status)
The END as status
T
GROUP BY id
;
Want that if each State ID is NULL? The CASE expression above returns NULL in this situation.
-
A combine with other values of the column, the column values
Hi allI need your help on this. I have a req I need to combine values of a percentage to the values of column test column. Here are examples of data
Select decode('test',null,'ABC') abc, b.percent, b.amount
from tableA, tableB b
where id = b.id
Examples of data
Amount of the percentage TEST
ABC 0.3 10
ABC 0.5 20
ABC 0.2 30
After him combine the values of percentage to the ABC percentage column values must be zero
Desired output
Amount of the percentage TEST
ABC(30%) 10
ABC(50%) 20
ABC(20%) 30
Valuable suggestions are appreciated
Alter the query from Etbin with a trifle for the exact release.
with
t as
(select 'ABC' test, 0.3 percent, 10 amount of all the double union
Select 'ABC', 0.5, 20 double Union all
Select 'ABC', 0.2, 30 double
)
Select test | ' ('| to_char(100 * percent) |'%)' test, null as a percentage, the amount
t
Maybe you are looking for
-
Why AutoSave does not work?
My speech has stopped its work of automatic backup. If I saved the file once or not, I'll have more in more frequent crashes and all the work disappeared. I reinstalled the software and updated, but the problem is recurring. Ideas? (A hint: I always
-
I went to about: config for browser.tabs.close buttons. They allow numbers from 0 to 3. I tried all the numbers.0 stops 3 or more tabs at the same time and 1, 2, 3 all of the tabs close both at the same time.How do I change back to 1 tablet being clo
-
If a cell in numbers is empty then do nothing, otherwise, no sum?
How to format a formula like this?
-
I know my password but I can not connect
I recently (accidentally) disconnected (e) Skype when you try to shut it down. After trying to connect again and tell him that "sorry, we did not recognize your connection details. Please check your Skype name and password and try again. "I realized
-
Satellite M30X-127 does not illuminate
Hello Need help!My satellite M30X 127 does not illuminate. When I push the power button, it is DIRECTED in turn. But nothing comes on the screen. There is no sound and the fan does not start. I took it to a repair center and they told me the motherbo