Non-string TABLE?
Is there any way to change the data type of a table to an integer, or double - or can tables only be string arrays?
> Is there any way to change the data type of a table to an integer, or
> double - or can tables only be string arrays?
Currently, tables can only contain strings. If you have an array of
numbers, look at the string formatting nodes to produce a datatype
that you can wire to/from the table.
Greg McKaskle
Similar Messages
-
ORA-22905: cannot access rows from a non-nested table item
Hi All,
This is the overview of the query used in the package.
select ename,empno,sal,deptno from
(select deptno from dept) a,
(select ename,empno,sal from emp1) b
where empno in (select * from table (pkg1.fun1('empno')))
and a.deptno=b.deptno
union
select ename,empno,sal,deptno from
(select deptno from dept) c,
(select ename,empno,sal from emp2) d
where empno in (select * from table (pkg1.fun1('empno')))
and c.deptno=d.deptno
Here the pkg1.fun1 will convert the string ('empno') into table form. ('empno') is the input parameter to the package and is a string of emp numbers.
compilation is successful. when this is executed the below error pops up
"ORA-22905: cannot access rows from a non-nested table item"
Is there any problem with the table function which i am using in this query
could anyone guide me to the solution.
Thanks AllI have used
CREATE OR REPLACE
type tab_num as table of number;
select * from table (cast(pkg1.fun1('empno')) as tab_num))
This throws an error during compilation itself
"PL/SQL: ORA-00932: inconsistent datatypes:expected number got varchar2 -
Order by on a non-base table field
I want to order by on a non-base table field in a form. Can any body help how to do this in a form.
ThanksRamesh,
I am not sure of ver 4.5. But in v6i, I did something similar.
What I did was :-
1. Based the Block's datasource on a stored procedure and
not TABLE
I'm not sure if it can be achieved in 4.5. First check if the block data source can be based on a stored procedure.
Here's a sample code of what i did :-
/* Description : Using a stored procedure as a block datasource.
Author : Shailender Mehta
Create Or Replace PACKAGE my_datasource Is
/* Shailender Mehta */
TYPE outrec is RECORD (comp_id tbgp_gl_detail.comp_id%Type
,cc_id tbgp_gl_detail.cc_id%Type
,journal_no tbgp_gl_detail.journal_no%Type
,account_code tbgp_gl_detail.account_code%Type
,debit_amt tbgp_gl_detail.debit_amt%Type
,credit_amt tbgp_gl_detail.credit_amt%Type
,sort_order Number(1)
TYPE outcur is REF CURSOR RETURN outrec;
PROCEDURE outquery (resultset In Out outcur
,p_journalno In Number);
END;
Create Or Replace PACKAGE BODY my_datasource IS
PROCEDURE outquery(resultset In Out outcur
,p_journalno In Number)
Is
BEGIN
OPEN resultset FOR
SELECT comp_id
, cc_id
, journal_no
, account_code
, debit_amt
, credit_amt
, Decode(substr(account_code,6,1), 'g', 1,
'd', 2,
'b', 3,
'h', 4,
'f', 5,
'a', 6,
'c', 7, 8) sort_order
FROM tbgp_gl_detail
WHERE journal_no = p_journalno
ORDER BY 7;
END;
END;
Use the Block Data Wizard, which will guide you step by step what next to be done.
In my example, I'm sorting the resultset by the 6th character of the string Account Code.
In your case, you could join the main table by the one used in your POST-Query in the stored procedure and sort the resultset.
- Shailender - -
How to find out the Non Partitioned Tables used 2Gb on oracle
Hi team
how to find out the Non Partitioned Tables used > 2Gb on oracle where not is sys & system
regardsheres 1 I made earlier
set pagesize 999
set linesize 132
col owner format a25
col segment_name format a60
select owner,segment_name,segment_type,(bytes/1024/1024)"MB size"
from dba_segments
where owner not in ('SYS','SYSTEM','XDB','MDSYS','SYSMAN') -- edit for taste
and segment_type = 'TABLE'
having (bytes/1024/1024) > 2000
group by bytes, segment_Type, segment_name, owner
order by 4 asc -
Partition an Non Partition Table in 11.2.0.1
Hi Friends,
I am using Oracle 11.2.0.1 Oracle Database.
I have a table with 10 Million records and it's a Non Partitioned Table.
1) I would like to partition the table (with partition by range ) without creating new table . I should do it in the existing table itself (not sure DBMS_REDEFINITION is the only option ) (or) can i use alter table ...?
2) Add one partition which will have data for the unspecified range.
Please let me know the inputs on the above
Regards,
DBHi,
what is the advantage of using DBMS_REDEFINITION over normal method (create partition table,grant access,insert records)You can't just add a partition in a non-partitioned table. You need to recreate existing table to have it partitioned (you can't just start adding new partitions to existing non-partitioned table). Advantage of dbms_redefinition is that it is online operation to re-create an existing table and and your data always remains available during table recreation
I would like to know how to copy the object privileges,constraints,indexes from Non Partitioned table (sales) to Partitioned table (sales_part) which i am creating. will >DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS help on this?First you need to tell us what method you are using to partition an existing table? If you are using dbms_redifiniiton, you really don't need to worry about triggers, indexex or constraints at all. Just follow any document which explains how to use dbms_redifinition. Dr. Tim has done a lot of work for dummys like us by writing documents for us. Follow this document.
http://www.oracle-base.com/articles/misc/partitioning-an-existing-table.php
If so can i use DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS alone for copying the table dependents alone after i create partition table (or) it should be used along with >DBMS_REDEFINITION.START_REDEF_TABLE only?See above document which i mentioned.
Salman -
Tabular form with non base table field
I want to develop a tabular form with
1. A non-base table edit field to accept a value
2. Insert/update another table based on the input value
3. Also, computed field on each row based on other fields on the records (like post-query trigger in oracle forms at block level - for each row)
Thanks,
RachnaThanks for your reply.
Varad, I like the link you sent me. It has a lot of good information.
I created a process (under page processing) called "Update/Insert Process" that dosn't seem to be working.
Question, I created a manual tabular form with SQL Query and created a process (under page processing) called "Update/Insert Process", then I check for each record in the tabular form. If the old value <> new value then I update/insert in the new table.
Any step by step will be highly apprciated - to create process/validation etc.
Thanks,
Rachna -
Can Shuttles be based non-base table ViewObjects with transient attributes
Hello,
Users have to select records from a data collection and a Shuttle looks most appropriate/nice for this purpose. We can introduce technical intersection tables in order to generate the Shuttles with JHeadstart 10g R3 if necessary, but there is no “functional” need to update any data in the database and therefore it would be practical if the ‘right’ side from a Shuttle can be based non-base table ViewObjects with transient attributes only. So, our interested is to know which records have been selected, i.e. moved to the right side from the Shuttle.
Hope that my question is clear enough.
Greetings,
MichaelMichael,
This cannot be generated out-of-the-box.
It is easiest to add the shuttle post-generation to your page, and then create a custom template to generate your custom shuttle into the page. I suggest you take a look at an example of a generated shuttle in a page, and the JHeadstart IntersectionShuttleBean class. You will see that the value property of <af:selectManyShuttle> points to the selectedKeys method in the JHeadstart Shuttle bean. In your case, you can create your own managed bean and bind the value property to your own method which will provide you access to the selected rows. The value property of the selectItem within the af:selectManyShuttle determines the property that is used to identify the selected row (which is the row key in case of Jhs-generated shuttles).
Steven Davelaar,
JHeadstart Team. -
Insert records into non base table
Hi
I would like to insert records into a table when a button is clicked. The table is a non base table. I am trying to save records displayed in a form into a history table which is not part of the form. I am using the following code stored in a program unit then called when the button is pressed. It doesn't generate any error but the records are not inserted. Can anyone please help.
hist_id := 1;
cust_name := :CUSTOMER.cust_name;
loan_date := :LOAN.loan_date;
return_date := LOAN.return_date;
FORMS_DDL('INSERT INTO LOAN_HISTORY VALUES'||hist_id||','||cust_name||','||loan_date||','||return_date);Why do you need forms_ddl built in for a DML statement to be used in form?
U can directly use insert.
hist_id := 1;
cust_name := :CUSTOMER.cust_name;
loan_date := :LOAN.loan_date;
return_date := LOAN.return_date;
INSERT INTO LOAN_HISTORY VALUES (hist_id,cust_name,loan_date,return_date);
It should work perfectly. -
ORA-22905: cannot access rows from a non-nested table item in Table func
I am using a table function in Oracle 8.1.7.4.0. I did declare an object type and a collection type like this:
CREATE TYPE t_obj AS OBJECT ...
CREATE TYPE t_tab AS TABLE OF t_obj;
My table function returns t_tab and is called like this:
SELECT ... FROM TABLE (CAST (my_pkg.table_fnc AS t_tab)) ...
This works pretty well as long as I run it in the same schema that owns the function and the 2 types. As soon as I run this query from another schema, I get an ORA-22905: cannot access rows from a non-nested table item error, even though I granted execute on both the types and the function to the other user and I created public synonyms for all 3 objects.
As soon as I specify the schema name of t_tab in the cast, the query runs fine:
SELECT ... FROM TABLE (CAST (my_pkg.table_fnc AS owner.t_tab)) ...
I don't like to have a schema hard coded in a query, therefore I'd like to do this without the schema. Any ideas of how to get around this error?Richard,
your 3 statements are correct. I'll go ahead and log a TAR.
Both DESCs return the same output when run as the other user. And, running the table function directly in SQL*Plus (SELECT my_pkg.table_fnc FROM dual;) also returns a result and no errors. The problem has to be in the CAST function.
Thanks for your help. -
Using DBCO with a non 'Z' table
Hi all,
I need to access a table in an Oracle DB. the connection in transactioncode DBCO is created. But when I try to select from table 'FTTH' i get the message ' "FTTH" is not defined in the ABAP Dictionary.........'.
I have been told that the table also needs to be created in SAP. But how due I solve this when the table name dos not start with a 'Z'.
I have been sugested that the way to solve this is to create an Alias on the Oracle server. Is this the correct way. Or is there a way to solve it in SAP without creating a non 'Z' table.
Thanks in advance.
Best regards
DennisHello Dennis,
you could use native sql to access this table ( commands EXEC SQL. ... ENDEXEC ).
Have a look on OSS - note 323151 .
Regards Wolfgang -
Calculated non-base table field in a tabular form
I am struggling with creating a non-base table calculated field in a tabular form in ApEx 3.1
Can you point me in the right direction
I thought this would be fairly easy to do, but I cant work out how to do it
Requirements
1) Tabular Form based on a table with QTY and PRICE columns
2) TOTAL is a non-base table field, based on QTY * PRICE
3) If the Qty or Price changes, the TOTAL should be re-calculated
Example
QTY PRICE TOTAL
=== ===== =====
3 5 15
10 50 500
20 3 60
Environment
ApEx 3.1, Oracle 10 and Oracle 11 databases
I recommended to upgrade to a newer version of ApEx but the request was rejected so Im stuck with 3.1Thanks, but its not the solution that I am after
I am looking for a solution that will ...
1) not require the calculated value TOTAL to be stored in the table
and 2) re-calculate the TOTAL when I modify the dependent values (QTY and PRICE) before I save the changes to the database
I am still looking for a solution if anyone can help -
11.2.0.3 Parallel delete on non-partitioned table
Friends and mentors...
I want to know more about parallel deleted and it's requirements...I have gone through Oracle manuals and articles but not able to understand exactly about parallel delete (dml) feature...
Task: Trying to delete large data (20 mil rows out of 60 mil) from non-partitioned table
Job frequency: Once every month
Oracle: 11.2.0.3
OS: Linux
Questions:
1. Any idea on best approach?
2. Do I need to have table partitioned to use /*+parallel */ hint?
3. If I use /*+parallel*/ hint in delete statement then do I need to use "alter session enable parallel dm1" ?
4. How to decided degree of parallelism (DOP)? is it good to use auto for DOP?
Currently I am planning to use parallel hint in delete statement, is this enough or need better plan?
thanks..khallas301 wrote:
Friends and mentors...
I want to know more about parallel deleted and it's requirements...I have gone through Oracle manuals and articles but not able to understand exactly about parallel delete (dml) feature...
Task: Trying to delete large data (20 mil rows out of 60 mil) from non-partitioned table
Job frequency: Once every month
Oracle: 11.2.0.3
OS: Linux
Questions:
1. Any idea on best approach?
2. Do I need to have table partitioned to use /*+parallel */ hint?
3. If I use /*+parallel*/ hint in delete statement then do I need to use "alter session enable parallel dm1" ?
4. How to decided degree of parallelism (DOP)? is it good to use auto for DOP?
Currently I am planning to use parallel hint in delete statement, is this enough or need better plan?
thanks..
It appears that you believe that parallel is always faster than non-parallel; which is not true in every case.
The slowest part of any DELETE is the physical I/O.
How many parallel processes accessing the same table before the disk gets saturated? -
Non-string objects as parameters to an applet
how can i pass non-string objects as parameters to an applet?
thanks in advance...those are some objects that i wroteThen, you could use Class.forName() method for your string parameters.
If you get the classes, then you can call newInstance() method on them to get objects.
Alternative way could be using your string parameter as index or keys for some
data structures that contains ready-made objects. -
UPLOADING DATA IN A NON STANDARD TABLE
I have a non standard table.I want to upload data in that table using SCAT.So,how Test case can be created for uploading the data in that table?
Edited by: Debasish Behera on Mar 17, 2008 1:02 PMAs it is a Z table yiu can directly uploda data by an ABAP program. Read the data from a flat file and simply insert into that table.
-
Convert non-partition table to partition table
Hello Everybody
I am just want to ask about how to Convert non-partition table to partition table ?
Thanks
Ramez S. SawiresDear ARF
First of all thank you for replying me , second do u have any links talking about dbms_redefinition package
I am using Database Oracle 10g
Thanks
Ramez S. Sawires
Message was edited by:
Ramez S. Sawires
Maybe you are looking for
-
New line character in c:out
hi! I need to print a string in a table , and i am using <c:ForEach> and <c:out> tags to retrieve the data from a session scoped collection. the problem is that i need the data to be printed with new line characters to separate paragraphs, but if i p
-
Best practices for creating movie from still images?
I have created an architectural model in *someone else's* software, and animated a camera in *someone else's* software, and rendered that out to still images. I rendered every 5th frame (for a total of 401 frames) in order to save time on rendering.
-
Fcp 7 Canvas window zoomed out
Starting a project and the canvas window is zoomed out. Both canvas and viewer are at 25%. Viewer looks perfect viewing the file in the browser. I've had this problem before, but couldn't figure it out. I hope its an easy fix. Thank you!
-
I would like to disable ssl 3 but need to test what sites only support ssl 3. I keep getting stuck with an error that is over my head. I've tried manipulating the string a dozen different ways and keep getting the same error. I am not familiar with -
-
Regarding 1z0-007-certification
I Edited by: user8729159 on Aug 17, 2009 9:29 AM