Method of displaying Pl/Sql types
Hello
I would like to know how to print all attributes of type pl/sql.
For example, I created the method of display_address below. I would like to know how to print all attributes rather than give one by one. In my project, we have over 1,000 attributes that are defined under the body. It is therefore difficult to print everything one by one.
It would be very useful if someone help me on this.
CREATE or REPLACE TYPE employee_typ AS BODY
FUNCTION MEMBER card get_idno IS BACK
BEGIN
RETURN number;
END;
MEMBER display_address (SELF IN OUT NOCOPY employee_typ) PROCEDURE IS
BEGIN
DBMS_OUTPUT. Put_line(employee_id ||) ' ' || employee_id);
DBMS_OUTPUT. Put_line(first_name ||) ' ' || last_name);
DBMS_OUTPUT. Put_line (Address.Street);
DBMS_OUTPUT. Put_line(Address.City ||) ', ' || Address.State | ' ' ||
Address.Postal_Code);
END;
END;
/
Post edited by: user8367258
Grand... Thank you... That's what I'm looking for.
Thank you again...
Tags: Database
Similar Questions
-
partial output displays only SQL query.
Hello
When I tried to view a display of the query source code, I am able to see the partial only as output below.
SQL > select text from user_views where view_name = "ABC";
TEXT
--------------------------------------------------------------------------------
SELECT the region
product_director,
plan_year,
where the text should be about 200 lines. Is this a problem of settings... ? . Waiting for your response.
Kind regards
Bharath
Published by: user12026039 on July 6, 2011 12:17 AMMaybe this would help
-
What is the difference between the following methods to display the...?
What is the difference between the following methods to display the plan to explain it?
PLAN of EXPLAIN for SQL statements
package dbms.xplan
Thank youYou are mistaken in thinking that they are alternatives.
EXPLAIN the PLAN meets the PLAN_TABLE.
Only after that can you use either of
SELECT... FROM PLAN_TABLE
or
SELECT * FROM TABLE (DBMS_XPLAN. DISPLAY);Unless you are using DBMS_XPLAN. DISPLAY_CURSOR directly on a present cursor in the shared pool, the PLAN to EXPLAIN is still a sine qua non for DBMS_XPLAN. DISPLAY.
Hemant K Collette
http://hemantoracledba.blogspot.com -
"Why should I keep my keys for a second for my keyboard display what i type.
Hello
Check the following points.
From the windows control panel, open the ease of access Center and click on the link "make the keyboard easier to use. If there is a check mark in the box beside 'Turn Sticky Keys' or ' turn on Filter Keys, Remove these and then click on apply to apply the change to see if that solves the problem.
Kind regards
DP - K
-
The elements and the SQL Types
I just started learning apex and I'm confused about the application and page elements. Since they can serve as a kind of variables in the SQL and PL/SQL (for example, by using the syntax variables bind), at some point they should be prescribed a type, since SQL and PL/SQL are two strongly typed languages.
It seems that the items have types, see the documentation (http://docs.oracle.com/cd/E11882_01/appdev.112/e11947/bldapp.htm#BCEDCGGH), but I don't know how they correspond to the SQL types.
For example, I saw that to_date is always used with items of type date picker, implying that it is a string of SQL type.
So the question. What have SQL type apex page/application parts, is what type conversion do I need to use when dealing with items in SQL and PL/SQL?They are all VARCHAR2 (4000) as far as I know - anything application are the same and the page elements is adjustable in number or date more. Put date or number will include only internal validation, check whether the format is match the parameters of globalization of applications.
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Apress.com/9781430235125
http://Apex.Oracle.com/pls/Apex/f?p=31517:1
http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
------------------------------------------------------------------- -
How display you the type of file in PS Elements 10?
How display you the type of file in PS 10 items in the organizer for each photo?
I know that you can right click and watch meta data.
In PSE 7 it was displayed under each photo.
Two things:
1. set the display option to display file names:
2. make sure your tiles are large enough to display the data:
Ken
-
SQL type unrecognized: 'unsigned int' when I expand a table in Dreamweaver
Dreamweaver warning message - "unrecognized sql type: 'int unsigned.
This was happening in Dreamweaver MX and now in CS3. Pages using these tables are not to throw errors when I test them, but whenever I have to expand a table in Dreamweaver, I get these warning messages. Often, I get the same message several times and have to click OK every time before I can move forward. I had earlier OK the warning three times for a table that has a field of type integer and the two fields in total.
Any help would be greatly appreciated.
Thank youYes, it's a bug.
http://www.Adobe.com/cfusion/mmForm/index.cfm?name=wishform
I can't speak for everyone, but I have looked into the using integers as primary keys DW start hiccupping on them.
--
Ken Ford
Adobe Community Expert
Fordwebs, LLC
http://www.fordwebs.com'Bagger Vance'
wrote in message news:[email protected]...
> I prefer these integers be unsigned - is a bug in Dreamweaver? I do not have
> much expertise in MySQL, so do you know if it is unusual to use a
> unsigned integer with auto-increment for a primary key? I am baffled that I seem
> one of the few with this problem.
>
> Thank you
> -
Unrecognized SQL type: "double non signed."
I have a table that uses the fields defined as 'double unsinged. Whenever I develop this table in the database box, I get the error "unrecognized SQL type:"double unsigned.
Is this a bug or is it a mistake to strange configuration on my part?Hello
-
grant the privilege on the SQL types to another schema
I created two SQL types under the APP_OWNER scheme as follows:
CREATE or REPLACE TYPE t_instr_info as an OBJECT
(NUMBER IMNT_KY)
CREATE or REPLACE TYPE t_tab_instr_info
AS THE t_instr_info TABLE
The privilege on these two types as follows:
Grant execute on t_tab_instr_info to vprods_app2
Grant execute on t_instr_info to vprods_app2
The stored procedures must be developed in the scheme of the APP. In the scheme of the APP, I need to call this type to declare the array as follows:
v_tab_output app_owner.t_tab_instr_info: = app_owner.t_tab_instr_info ();
I get a PLS-00905: object owner.t_tab_instr_info is not valid
I tried giving EVERYTHING instead of run, but the problem persists.
Help, please. As a policy of all objects including tables, types etc. must be app_owner and the app schema privileges
Thank you in advance.One thing I forgot to mention (since you do not explicitly specify how you are granting things) is that you need to issue DIRECT subsidies (as in my example above), you cannot compile the code if you have subsidies via a role (but you can execute anonymous blocks).
This is an example
create user APP_OWNER identified by APP_OWNER default tablespace users temporary tablespace temp; grant connect, resource, create role to APP_OWNER; create user APP_SCHEMA identified by APP_SCHEMA default tablespace users temporary tablespace temp; grant connect, resource to APP_SCHEMA; connect APP_OWNER/APP_OWNER@xe create role for_apps; CREATE OR REPLACE TYPE t_instr_info as OBJECT (IMNT_KY NUMBER); / CREATE OR REPLACE TYPE t_tab_instr_info AS TABLE OF t_instr_info; / grant execute on t_instr_info to for_apps; grant execute on t_tab_instr_info to for_apps; grant for_apps to app_schema; connect APP_SCHEMA/APP_SCHEMA@xe APP_SCHEMA_XE?create or replace procedure test 2 as 3 v_tab_output app_owner.t_tab_instr_info := app_owner.t_tab_instr_info(); 4 begin 5 null; 6 end; 7 / Warning: Procedure created with compilation errors. Elapsed: 00:00:01.17 APP_SCHEMA_XE?show err Errors for PROCEDURE TEST: LINE/COL ERROR -------- ----------------------------------------------------------------- 3/17 PL/SQL: Item ignored 3/17 PLS-00201: identifier 'APP_OWNER.T_TAB_INSTR_INFO' must be declared APP_SCHEMA_XE?declare 2 v_tab_output app_owner.t_tab_instr_info := app_owner.t_tab_instr_info(); 3 begin 4 null; 5 end; 6 / PL/SQL procedure successfully completed. Elapsed: 00:00:01.17
-
Sqlplus and column display long data type
I need to run simple table_abc of sqlplus select field_name but I get first 100 characters or so of output. This column (field_name) is the long data type.
What would be the correct way to display long data type fields in SQLPLUS?
Database: 8.1.7
Thank you.Hello
Try to use suite and run as a script
set lines 400; set long 18000; set heading off; select a, b, c from tablec;
Concerning
-
Data type of text is not displayed using SQL Server and ASP/VBScript
Maybe someone help me with this because I used to use PHP/MySQL, but I use for this a Classic ASP/VBScript and MS SQL Server instance and I don't know that much. The scenario is I have an old site that was designed using html tables and I do a CSS/XHTML update on Visual design. As long as we are here, there are some pages that are dynamic and use a MS Access database and we thought it's a good time to upgrade from MS SQL Server (2005, to be exact). No time/money for bringing classic ASP VBScript in ASP .NET.
Overall, the upgrade went fairly well, especially just to create a new connection to the DB in SQL Server in Dreamweaver after all the tables and data were migrated to SQL Server. Almost everything works as it should. A problem though.
For some reason, the data of the data type 'text' in SQL Server is not appear (or sometimes appear). I even tried to recreate the recordsets and binds fresh data and the code is more or less identical to what we had before. Anyone know what's happening, or how I can get this data to show?
I think that there is perhaps some simple and double quotes in the text data and which could be screwing things up. I was hoping there is only a simple function that I could apply the code, but as I said, I don't know.
Thanks in advance for any help you can provide.
-Billcaptcashew wrote:
> Maybe someone help me with this because I used to use PHP/MySQL, but for this one
> instance I use Classic ASP/VBScript and MS SQL Server and I do not know
> that much. The scenario is that I have an old site that was designed using html
> tables and I do a CSS/XHTML update on Visual design. As long as we
> are there, there are some pages that are dynamic and that use a MS Access
> database and we thought it's a good time to upgrade from MS SQL Server
> (2005, to be exact). No time/money to classic ASP VBScript in ASP.
> .NET so.
>
> Overall, the upgrade went quite well, especially just needed a new
> connecting to the DB in SQL Server in Dreamweaver after all tables and data
> have been migrated to SQL Server. Almost everything works as it should. One of the problems
> If.
>
> For some reason, the data of the data type 'text' in SQL Server is not
> appear (or sometimes appear). I even tried to recreate the recordsets and
> binds fresh data and the code is more or less identical to what we had
> front. Anyone know what's happening, or how I can get this data to show?
>
> I think that maybe there are single and double quotes in the text
> data and which could be screwing things up. I was hoping that there is only a simple
> function I could apply the code, but as I said, I don't know.
>
> Thanks in advance for any help you can provide.Your text field should be the last of your select statement, as
its not stored in the table with the other data, its stored elsewhere,
as a binary object, should be treated differently. Its common
the migration of the access problem.If you need more of 8000 characters stick with him, otherwise use
varchar (8000) or nvarchar (4000) If you need (limited unicode characters
4,000 cos of the double byte characters)Dooza
--
Display guidelines
http://www.Adobe.com/support/forums/guidelines.html
How to ask Smart Questions
http://www.CatB.org/ESR/FAQs/smart-questions.html -
Hi Experts,
I am trying to solve a problem. It is possible by other methods, but I want more precisely to explore and learn that using the Clause TYPE.
But facing some problem-
WITH t (i, col1, col2, col3) as)
SELECT 1,10,10,8 FROM dual UNION ALL
SELECT 2.15, null, 13 double UNION ALL
SELECT 4.20, null, 20 FROM dual UNION ALL
SELECT 3.7, null, 18 DOUBLE
)
---------------------------
-Samples above
---------------------------
SELECT *.
T
MODEL
dimension BY (i)
measures (col1, col2, col3)
rules
(
col2 [I > 1] = col2 [cv () - 1] - col3 [cv () - 1]
)
I ORDER
;
ORA-32637: Cyclic rudder automatically in sequential order MODEL
The ORA error is self-explanatory and so I guess the problem is use
col2 [I > 1] = col2 [cv () - 1]
The solution I want to achieve is-
col2 = (col2(previous row) - col3 (previous row)) + col1 (current row)
So my expected output should be-
1 10 10 8
2 15 17 13
3 20 24 20
4 7 11 18
and so on...
Please let me know if this can be achieved by using the type Clause.
Any response in this matter is appreciated.
Thank you and best regards,
-Nordine
(on Oracle 11.2.0.3.0)
Nordine include the ORDER BY clause in the RULES section
SQL > WITH t (i, col1, col2, col3) as)
2. SELECT 1,10,10,8 IN the dual UNION ALL
3 SELECT 2.15, null, 13 double UNION ALL
4 SELECT 4.20, null, 20 double UNION ALL
5 SELECT 3.7, null, 18 DOUBLE
6)
7 - Select * from t
8 ---------------------------
9 - sample data above
10 ---------------------------
11. SELECT *.
12 FROM t
MODEL 13
size 14 BY (i)
15 measures (col1, col2, col3)
16 rules
(17)
col2 18 [I > 1] i order = col2 [cv () - 1] - col3 [cv () - 1] + col1 [cv ()]
19)
20.
I HAVE COL1 COL2 COL3
---------- ---------- ---------- ----------
1 10 10 8
2 15 17 13
4 20 13 20
3 7 11 18
SQL >
-
Can we do this grouping of straight SQL type?
Version of database is 10.2.0.2.0
I wrote a script (below) that displays a list of the segments in a tablespace in order. He collapsed areas adjacent to the same segment (or space), but for this I had to use the PL/SQL. One of you out there assistants can show me how to do in SQL directly. The TEMP_REPORT table is a global temporary table that is used to pass data from PL/SQL to a file on the client. In the case of SQL right I wouldn't use such a table.
Published by: old s/n 29 January 2009 21:31variable tablespace_name varchar2(30); declare ts_name varchar2(30); begin select upper(tablespace_name) into ts_name from dba_tablespaces where tablespace_name=upper('&1'); :tablespace_name := ts_name; end; / declare cursor ts_map is select block_id, blocks, owner, segment_name,segment_type from dba_extents where tablespace_name = :tablespace_name union all select block_id, blocks, 'sys' owner, 'Free' segment_name, 'FREE' from dba_free_space where tablespace_name = :tablespace_name order by 1; p_rec ts_map%rowtype; first_rec boolean := true; my_row number; begin delete from temp_report; my_row := 0; for rec in ts_map loop if first_rec then first_rec := false; p_rec := rec; else if p_rec.owner = rec.owner and p_rec.segment_name = rec.segment_name and p_rec.segment_type = rec.segment_type then p_rec.blocks := p_rec.blocks + rec.blocks; else my_row := my_row + 1; insert into temp_report values ( my_row, rpad(p_rec.owner,10) || rpad(p_rec.segment_name, 32) || rpad(p_rec.segment_type, 20) || to_char(p_rec.block_id,'999,999,999,990') || to_char(p_rec.blocks,'999,999,999,990')); P_rec := rec; end if; end if; end loop; if first_rec != true then my_row := my_row + 1; insert into temp_report values ( my_row, rpad(p_rec.owner,10) || rpad(p_rec.segment_name, 32) || rpad(p_rec.segment_type, 20) || to_char(p_rec.block_id,'999,999,999,990') || to_char(p_rec.blocks,'999,999,999,990')); end if; end; / set heading off set pagesize 60 set linesize 94 set newpage 0 ttitle center 'tablespace map for &1' skip 1 - left 'Owner Segment Name Segment Type Block ID Blocks' skip 1 - left '-------- ------------------------------ ------------------ ---------------- --------------' spool tablespace_map.&1. select work_text from temp_report order by big_line_num; spool off
with Extents as ( select block_id, blocks, owner, segment_name,segment_type from dba_extents where tablespace_name = :tablespace_name union all select block_id, blocks, 'sys' owner, 'Free' segment_name, 'FREE' from dba_free_space where tablespace_name = :tablespace_name ), Extent_RNs AS ( select e.*, ROW_NUMBER() over(ORDER BY Block_Id) Block_RN, ROW_NUMBER() over(ORDER BY owner, segment_name, segment_type, block_id) Seg_RN from Extents e ) select MIN(block_id) as Block_Id, SUM(blocks) AS Blocks, owner, segment_name,segment_type from Extent_RNs group by owner, segment_name, segment_type, Block_RN - Seg_RN order by Block_Id ;
Kind regards
Dima -
Check boxes are not displayed properly checked < input type = "checkbox", "checked" > in 4.0.1 when they are fine for the same page in 3.6.17
Maybe you can try to use controlled instead of "checked".
-
How to display scrollbars on Type Def
Dear programmers,
Question:
Does anyone know how to display scroll bars in a window of Type Def after that both have been disabled?
Background:
I have a several projects where the scroll bars do not appear on some Type definitions. It is possible that they may have been disabled by other programmers in the past. This prevent me to see big bouquets stored inside and I have to physically move the entire cluster which takes a long time. I can't find a way to reactivate them (assuming both have been disabled).
You can reproduce my problem if you start with a new Type def...
Disable the two scroll bars...
After that the scroll bars disappeared, how do I return? Using the control properties > appearance window will not allow the user to customize the scroll bars, and is no longer a right click menu available because you have to click with the right button on the bar itself scrolling.
For those who work for the glory, I can provide the !
It's funny, I couldn't find a simple way to do it either!
You can try this code snippet. Please backup your control before you run it. Just browse the constant path to the location of your command, then run.
Maybe you are looking for
-
I would check my story for the time of day, as well as for the date. This is a feature that is common? How can I configure to work indicating the time, as well as, the date? Thank you.
-
judgment of the Nwz-w274s installation
I bought a new player Walkman NEW-W274S, when I plug the Walkman to my Win 7 PC by USB cable, I have install the Setup.exe by following the manual, but when the time bar race and almost finished, the time bar stop and stay there (do not move), would
-
How can I change the amount of time before a call to voicemail
How can I change the amount of time before a call to voicemail? -alex-
-
Hello I recently created a Plugin data script to analyze a data file with a proprietary format. The script works great for indexing and loading of our data files. I'm currently working on another VBS script which is called by one of the function ke
-
can I get the free windows upgrade 10 if I am running windows vista Home premium?