Move from a table with htmldb_get
Take a look at the following of the JS:ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=foo',0);
arr = new Array();
arr[0] = 'Lorem';
arr[1] = 'Ipsum';
ajaxRequest.addParam('x01', arr);
alert(ajaxRequest.get());
Is it possible to recover the arr in application process foo? I tried something like that, but it was not good:declare
type arr is table of clob index by BINARY_INTEGER;
clobArr arr;
begin
clobArr := wwv_flow.g_x01;
htp.prn(clobArr(0));
end;
This returns the error below in the browser:sqlerrm:ORA-06550: line 5, column 23:
PLS-00382: expression is of wrong type
ORA-06550: line 5, column 3:
PL/SQL: Statement ignored
So a table with htmldb_get possible?
Hello
Just to know you can do it too
JavaScript
ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=FOO',0);
arr = new Array();
arr[0] = 'Lorem';
arr[1] = 'Ipsum';
for( var i=0,len=arr.length;i);}alert(ajaxRequest.get());
And On Demand Process FOO
htp.prn(apex_application.g_f01(2));
Regards,
Jari
Edited by: jarola on Aug 25, 2010 11:39 AM
Tags: Database
Similar Questions
-
Hi all
Problem: Build a VI to display a string in the table of the lights. Each letter must be posted in a separate table and letters must move from one table to the other in the direction from left to right.
I did program mentioned above but it does not work. Can you tell me what is the problem?
There is no error is indicated in the program. If someone knows about it please try to find solutions and help me out of this problem.
I have attached my program with this message.
Thank you in advance!
(1) FOR loops are your friend here. You can make a slight restructuring using loops, and then you will have less mess to deal with, the inner loop through tunnels of autoindexing to make it even simpler.
(2) I would only treat the numeric values of the characters. So go terminal of control of the chain, the capital letters and byte array to before the outer loop. You can use a size of Board over there to tell how many times the outer loop to iterate.
(3) the Index table is extensible. So you only need over the index of the first, and it will increment itself, as it develops.
(4) you need to finish the lookup table (table 3D)
-
How to export data from the table with the colouring of cells according to value.
Hi all
I use jdeveloper 11.1.1.6
I want to export data from the table with a lot of formatting. as for color cells based on value and so much. How to do this?
You can find us apache POI-http://poi.apache.org/
See this http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html
-
data from 3 tables with later dates
Hello
Need help with the PL/SQL code, I need to write a code that will get the data from 3 tables with the most recent date.
For an individual ACT_CODE the output of the SQL query should display the data including the last dates back to 3 tables, if there is no
Date of the table, it should show the remaining data (think that the left join will do here)
Names of tables:
Institution_UPDT aiu
AC ASQ_CONTACT
GR_AUTHORIZE gr
All 3 tables have ACT_Code in common
Column names
INSTITUTION_UPDT IAU - IAU. ACT_CODE, AIU.project_id as proj, IAU. UPDT_TYPE_ID, IAU. User_id, IAU. UPDT_DATE
ASQ_CONTACT ac - ac. ACT_CODE as contact_code, ac.project_id, ac.first_name, ac.middle_initial, ac.last_
Name, AC.title, AC. Status, AC.status_date
GR_AUTHORIZE gr - GR ACT_CODE as grad_code, gr.name, gr.title AS grad_title, gr.submit_date
Are the names of the columns date
AC.status_date,
IAU. UPDT_DATE and
Gr.submit_date
Thanks to you all
appreciate your help
JeshHi, Ngoumba,
If a given ACT_Code couldn't miss from any of the tables, then you will use better full outer joins, not a join left outer.
Perhaps it would be more effective to make a UNION of the three tables, then rotate the results in three datecolumns.
You can use the GROUP BY aggregation to get the last date for each ACT_Code in each table.
If you need other columns in the row which is the last date, you can use the ROW_NUMBER analytic function, like this:SELECT ACT_Code , updt_date , ROW_NUMBER () OVER ( PARTITION BY ACT_Code ORDER BY updt_date DESC ) AS r_num FROM institution_updt
The lines with r_num = 1 are the most recent
This is a technique of ot the UNION-PIVOT example:
WITH union_data AS ( SELECT ACT_Code , MAX (updt_date) AS last_date , 1 AS table_id FROM institution_updt GROUP BY ACT_Code UNION ALL SELECT ACT_Code , MAX (status_date) AS last_date , 2 AS table_id FROM ASQ_Contact GROUP BY ACT_Code UNION ALL SELECT ACT_Code , MAX (submit_date) AS last_date , 3 AS table_id FROM GR_Authorize GROUP BY ACT_Code ) SELECT ACT_Code , MAX (CASE WHEN table_id = 1 THEN last_date END) AS aiu_updt_date , MAX (CASE WHEN table_id = 2 THEN last_date END) AS ac_status_date , MAX (CASE WHEN table_id = 3 THEN last_date END) AS gr_submit_date FROM union_data GROUP BY ACT_Code ORDER BY ACT_Code ;
Published by: Frank Kulash, on September 16, 2009 15:02
Added UNION-pivot example -
How to match columns from two tables with
Hello:
I have two tables as below:
Table1::(Base Table)
Country | Prefix | Prefix_Length
Travel | 001 | 3
CountryB. 0012 | 4
PaysC | 00443 | 5
CountryD | 0091 | 4
:(Detail Table) table2
The population | Area | Prefix
500 | AreaA | 0015921
1000 | AreaB | 00122
400. AreaC. 00443743
300. ALIS | 0091333
100. AreaA | 001
I need to match these two tables with prefix columns (whose length is not fixed in the two tables: but it starts with 00 in the two tables). Two different countries the prefix may be similar up to a certain length. Thus, Prefix_Length can be used to determine (exactly) how much time should be taken in the search of Table2.
Output:
Country | Prefix | Area | Population
Travel | 001 | AreaA | 600
CountryB. 0012 | AreaB | 1000
PaysC | 00443 | AreaC. 400
CountryD | 0091 | ALIS | 300
Please help me with your valuable comments.
-TenderTry this
with base_table as ( select 'CountryA' country,'001' prefix,3 prefix_length from dual union all select 'CountryB','0012',4 from dual union all select 'CountryC','00443',5 from dual union all select 'CountryD','0091',4 from dual ), detail_table as ( select 10 no_of_call,'0015921' prefix from dual union all select 3,'00122' from dual union all select 50,'00443743' from dual union all select 50,'00443643' from dual union all select 300,'0091333' from dual union all select 60,'001' from dual ) SELECT country, prefix,sum(no_of_call) FROM ( select country, b.prefix,no_of_call, decode(no_of_call,lead(no_of_call,1,0) over(partition by no_of_call order by b.prefix,no_of_call),'y','n') y_or_no from base_table b, detail_table d where b.prefix = substr(d.prefix,1,prefix_length)) where y_or_no !='y' group by country, prefix order by country, prefix;
Published by: Vi on 20 February 2012 01:07
-
How to read/select only the records from a table with non-English characters
Hello
I need to find all records in a table with non-English (mainly Chinese) characters in at least one of the varchar2 columns. Let me kow if someone knows a way by which it can be done using SQL/PLSQL.
Best regards
Imranselect * from your table where your_column != convert(your_column, 'UTF8', 'US7ASCII)
Replace UTF8 with your database character set
Published by: thtsang on October 15, 2009 03:53 - unequal sign change of! =
-
expdp + query option to export from several tables with the same condition
Hello
We want to export a subset of data only from databases to another. Both on AIX.
Source/testdatabase 11.2.0.3 (non partitioned tables)
Target productiion 11.2.0.3 database (separate tables)
Tables of same names of columns but diffrenet structures a partitioning index and traget so only want to import content
Each source datbaase hascolumn seq number table and want only to extract the last months of data.
want to use expdp but not sure how to make sure that all tables have the seq_num WHERE > 100 condition, if let table1: go out and have justTABLES:table1,table2... DUMPFILE=dump_dir CONTENT=data_only QUERY= table1:"WHERE seq_num >100 "
QUERY = "WHERE seq_num > 100"this condition would apply to all tables that we want."
I'm assuming that can also use impdp CONTENT = data_only?
Any ideas/thoughts?
Thank youQUERY = "WHERE seq_num > 100"this condition would apply to all tables that we want."
Yes, it will work for all tables, but ensure that all exported table must include this column.
QUERY
Default: no
Goal
Allows you to filter the data that is exported by specifying a clause of a SQL SELECT statement, which is applied to all tables in the work of export or a specific table.The query_clause is usually a WHERE clause for the selection of refined lines, but could be any SQL clause. For example, an ORDER BY clause can be used to accelerate a migration from a table in a heap in a table held in index. * If a [schema]. table_name is not provided, the query is applied to (and must be valid for) all tables in the export job.*
http://docs.Oracle.com/CD/B19306_01/server.102/b14215/dp_export.htm
-
How publish data from the table with some data loss all post in the forum
I wonder how people are displayed the data in the table or the result of a query with losing them its format from Sqlplus display when they post in the forums of Oracle. I searched on the basis of knowledge of DB but I see no article about it. can you please help me or direct me to this link, I tried different options using code and other tags but nothing has worked, thank you for your help. Thank you.
Edited by: Ariean October 3, 2011 12:34You can click on the link to the FAQ at the top right: http://wikis.sun.com/display/Forums/Forums+FAQ.
-
Delete data from a table with joins
Hey guys,.
IV struggled for a while with a sql now.
I'm trying to remove some data from urole based on the www.lesormes.com in the select part.
The selection is correct, but the part delete Deletes all data in the table urole and not only those found in the select.
How can I delete all data by using a join?
DELETE FROM urole
WHEN THERE IS)
SELECT *.
User JOIN urole
ON user.userid = urole.userid
AND user.audit_version = urole.audit_version
JOIN secrole
ON urole.roleid = secrole.roleid
WHERE user.audit_current = 'Y '.
AND secrole.audit_current = 'Y '.
AND IN secrole.rolename
('X',
« Y »,
« Z »,
));
Thanks for your help in advance!Hello
Welcome to the forum!
Chances are, you don't want to join in the subquery EXISTS of EPM; It is more likely you want just like this correlated subqueries:
DELETE FROM urole WHERE EXISTS ( SELECT 0 FROM user WHERE user.userid = urole.userid AND user.audit_version = urole.audit_version AND user.audit_current = 'Y' ) AND EXISTS ( SELECT 0 FROM secrole WHERE secrole.roleid = urole.roleid AND secrole.audit_current = 'Y' AND secrole.rolename IN ( 'X', 'Y', 'Z' -- No comma here ) ) ;
or maybe an IN subquery:
DELETE FROM urole WHERE p_key IN ( SELECT urole.p_key FROM user JOIN urole ON user.userid = urole.userid AND user.audit_version = urole.audit_version JOIN secrole ON urole.roleid = secrole.roleid WHERE user.audit_current = 'Y' AND secrole.audit_current = 'Y' AND secrole.rolename IN ( 'X', 'Y', 'Z' ) ) ;
where p_key is a unique key (not necessarily a single column) of urole.
It's just a guess; That's all I can do with the information you have posted. Test this carefully before to try it on your actual data.
Whenever you have a problem, it allows to post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data.
In the case of a DML (such as DEL) problem, the sample data must re - create the tables as they are to the DML, and the results will be the content of the modified table (urole) after the DML.Furthermore, there is a built-in function called user, the user is not a good name for a table.
-
How to merge data from the table with a single line
Hello
I have three tables subscription_type, the address and the person. Here are the details of the table
Person Subscription_type Address
Person_Id AdressType_id Address_id
Person_name Description Address_type_id
Person_id
Address details
There are three types of different address - home, postal and previous.
Each person can have these three different addresses.
I want to create a view that displays all addresses of three of each person in the table of the person in a single line.
Any help please
In your example, there are 2 rows of columns street1, TOWN, SUBURB etc for a single person. To convert this into a single line, with the new columns we could simply use CASES or DECODE in the select as the SQL below. To understand why consolidation function THAT MAX is used - remove the MAX and GROUP BY in SQL keyword and try.
Select full_name
, max (case when description = "Home" then end street1) Home_Street
, max (case when description = "Home" then end suburb) home_suburb
, max (case when description = end of the "Home" then City) home_city
, max (case when description = "Home" then postal code end) home_postcode
, max (case when description = "Home" then end state_name) home_state
, max (case when description = 'Postal' then end street1) Postal_Street
, max (case when description = 'Postal' and then end of suburb) Postal_suburb
, max (case when description = 'Postal' then the city) Postal_city
, max (case when description = 'Postal' and then end of CP) Postal_postcode
, max (case when description = 'Postal' then state_name end) Postal_state
, max (case when description = "Back" then end street1) Prev_Street
, max (case when description = "Back" then end suburb) Prev_suburb
, max (case when description = "Back" then city end) Prev_city
, max (case when description = "Back" then postal code end) Prev_postcode
address a
S State
No p
Subscription_type att
where a.person_id = p.person_id
and a.state_id = s.state_id
and a.address_type_id = att.address_type_id
Full_name group
-
Best way to generate a record per day from a table with the dates of the FEP/exp
Hello
A table equipped with various attributes and a date of eff and exp. for example Attributeto, 05/01/2012, 16/05/2012
We want to create another table in this table for a record per day. for example 16 documents.
What is the best way to achieve this in OWB?
Thank youAssuming that you have a calendar table, then you can reach your rate table corresponding to the date table schedule between the table rates start date and end date.
Something like:
Select a.rate, rate_table b., calendar_table b.
where b. between a.start_date and a.end_dateshould translate easily into a join of two tables in OWB?
Concerning
User909022 -
Move a single table with data engine
Hello
I'm new on data mover. I want to move a table and I used the following script
the value of log c:\app\psft\export.log.
output c:\app\psft\export.dat;
export PS_COMMISSION;
I get the error
unsuccessful end 'command is not valid in bootstrap mode "?
help please?Use non-bootstrap mode instead (e.g. PS or VP1 or whatever else as SYSADM).
Nicolas.
-
return Recordset from several tables with session variables
First of all, let me start by appolgizing for the rawness of this question, but I'm really stuck... I have two tables in a database, a table name, username, password and company (user logs on to a secure site using the UN and PW creating a session MM_username variable). There are several users from different companies (IE 6 users of XYZ Corp., 20 ABC... etc.). The second table has data that is specific to each company. How to display the data in the second table so that it is specific to the user (ie: Robert of XYZ Corp. sees only specific data of XYZ Corp.)?
Thank you very much
What you would do, is to join the tables on the company name field in a query:
SELECT * FROM tbl_name LEFT JOIN tbl1.company_name ON tbl2.company_name WHERE username = MM_username;
If you need a more details or help database tables themselves you'll need post a few details anymore, but that's the gist of it.
And just to add, is that if you try to add in the session. Otherwise take your session for the company_name variable in table 1 and use it in a select query based on your session pages.
-
Drop a large number of tables with the same prefix
Hello
can you help me to make a script to move all the tables with the same prefix = TEST_LINK_?
Thank you very much.
CrystalHi crystal,
Here's something to start. It does not all FK constraints on those tables and assumes that the executor is the owner.
declare pstmt constant varchar2(255) := 'drop table :t purge'; vstmt varchar2(255); begin for rec in (select table_name from user_tables where table_name like 'TEST_LINK\_%' escape '\') loop vstmt := replace(pstmt, ':t', rec.table_name); dbms_output.put_line(vstmt || ';'); -- execute immediate vstmt; end loop; end; /
Concerning
Peter -
Removal of several tables with only loop FORALL
I need to remove the data from several tables with unique FORALL. It seems that FORALL does not support. Please let me know the alternatives to achieve this goal.
DB version: 11 GR 2
Write switchis for all instructions, one for each deletion. There is no reason why it should not work.
Compare:
Here are some things to know about FORALL:
Each FORALL statement can contain only a single DML statement. If your loop contains two updates and a deletion, then you will need to write three statements FORALL
Maybe you are looking for
-
I have been using my iPad Air since the day wherever she launched and I have had no problem, however, in my overall experience. But about a week ago my iPad started to be slower and slower and it crashed all the time to reach a State where it is now
-
I have monitor problems (Pavillion 22bw) they are as follows: 1) when turn on my monitor desktop sleeps. (2) how to wake up the monitor?
-
"Bluetooth is not ready" and can not be click the "Radio Power"?
Hello world Hope someone can help me: The pre-installed bluetooth software works fine on my Toshiba laptop no, until it suddenly collapsed bluetooth icon appear on the taskbar. When I try to connect to open all of the utilities of Bluetooth, the syst
-
Pavilion G6 power on password forgotten by my friend, just trying to help him. stop the 66158175 code
-
Re: can't get video to go to the TV via the HDMI on HP ENVY BEATS all in one
It is not a computer laptop is an all in one. There was no category for all in one computer so I had to choose computer laptop. It's the HP ENVY BEATS ALL IN ONE > There is no output from the HDMI and I was led to believe that the HDMI on this ALL IN