SQL & PL/SQL :: Limit On Number Of Lines Of Code Ijn Block

Jun 23, 2010

if i execute

begin
insert into t values('hgahaha');
.......
....
<17000 times insert statement>
end;

I get following error

ERROR at line 1:
ORA-06550: line 16385, column 13:
PLS-00123: program too large

But instead of pl/sql block if i write the insert statements as sql file and execute it produces no error

Does it mean pl/sql has limit on number of lines of code to 16385?

View 10 Replies


ADVERTISEMENT

PL/SQL :: Counting The Number Of Lines For Each Procedure In A Package

Jul 31, 2012

I would like to write a query on USER_SOURCE that can display the number of code lines for each procedure/function in a package. Is it possible to write such a query? Maybe by using analytical functions?

for example in the following example i would like to count the lines between

"PROCEDURE proc1 IS" and "END proc1;" and between "PROCEDURE proc2 IS" and "END proc2;"
SQL> select text  from user_source where name='PKG_TEST' and type='PACKAGE BODY';

TEXT
--------------------------------------------------
PACKAGE BODY PKG_TEST IS
/*************************************************
****/
PROCEDURE proc1 IS
BEGIN
update t1 set EDITION_NAME = 'AAAAAAA';
commit;
END proc1;
[code]....

View 14 Replies View Related

Forms :: Selection Limit On Block?

Apr 18, 2012

I have a question regarding a selection limit from a list of values. The table where my IDs (unit_codes) come from has another column called 'points'. each ID has its own number of points. Is there a way to put a selection limit on the display field that points will be placed on?

FOR EXAMPLE: a course block has a selection limit of 70 points, A person named someguy selects :
music = 20 points
maths = 20 points
mathsXTRA = 40 points
**ALERT!!! - U can ONLY select 70 points worth of units**

View 3 Replies View Related

Count Number Of Lines In Multi Line String

Aug 2, 2007

I have a string like this:

s_list varchar2(234) :=
'asdasd
asfsdf
dsfsdfs
dfsdfs';

How can I find the number of lines in this string? I tried using

INSTR('s_list', '
', 1, 1)

but it gives 0.

Is there any inbuilt function/proc SQL or PL/SQL which can do this?

View 2 Replies View Related

SQL & PL/SQL :: Limit Of Number Of Sub Programs In A Package

Aug 13, 2013

I'm looking for the information on:

•Limit of number of sub programs in a package.
•Limit of number of lines in a sub-program.
•Limit of number of statements in a sub-program.

I searched on net and found below useful information.

The size limit for PL/SQL stored database objects such as subprograms, triggers, and packages is the size of the Descriptive Intermediate Attributed Notation for Ada (DIANA) code in the shared pool in bytes. The Linux and UNIX limit on the size of the flattened DIANA/code size is 64K but the limit might be 32K on desktop platforms.

The most closely related number that a user can access is the PARSED_SIZE in the static data dictionary view *_OBJECT_SIZE. That gives the size of the DIANA in bytes as stored in the SYS.IDL_xxx$ tables. This is not the size in the shared pool. The size of the DIANA part of PL/SQL code (used during compilation) is significantly larger in the shared pool than it is in the system table.

is there any recommendation on limit of number of subprograms should exist in a package exist, If there is any guidelines/recommendation exist for these.

View 2 Replies View Related

Max Limit On Number Of Partitions / Can Have In A Table In Oracle

Feb 11, 2013

What is the limit on number of partitions on a table.on many forums , 1024k-1 is given the maximum limit.But Exactly , I am not able to understand this 1024k-1.

View 2 Replies View Related

Combine Tables With Union But Limit Number Of Records?

Sep 13, 2007

Updated to Add: In a last ditch search, I found my answer with ROWNUM <= 1 in the Where clause. It works and I can go from there with what I want to do.

I have a website that pulls similar information from multiple queries using a Union-based query. I want to only pull 1 record from one section, two from another, and 5 from the third. I've so far found LIMIT but haven't been able to get it to work in that way. Is it possible to limit each query in the union as I am looking to do?

The query is:

SELECTc.priority, c.startDate, p.headline, p.newsID, p.kicker, p.webPath, p.makePopup, p.thumbnail, p.shortDesc, p.storyType, d.filePath
FROM (so_news p LEFT OUTER JOIN so_news_deptLevel c ON p.newsID = c.newsID) LEFT OUTER JOIN so_departments d ON d.deptID = c.deptID
WHERE p.storyType = 'alert' AND c.display = 'yes' AND c.startDate <= sysDate AND c.endDate >= sysDate
UNION All
SELECTc.priority, c.startDate, p.headline, p.newsID, p.kicker, p.webPath, p.makePopup, p.thumbnail, p.shortDesc, p.storyType, d.filePath

[code]....

View 1 Replies View Related

Forms :: Limit Number Of Detail Records For Every Parent Record To 8?

Nov 10, 2010

1. My detail form has part number as one of the fields and I want to make sure the user can enter a part number only once. How can I make sure user cannot enter it more than once?

2. I want to limit number of detail records for every parent record to 8. How can I accomplish this?

3. I have approval flags at both master and detail. If the user tries to approve the master with some/all detail records unapproved, system should display error message and make the user approve the detail before approving the master.

View 2 Replies View Related

PL/SQL :: Can Give Name To Block Of Code In SP

Aug 29, 2013

Version- 10G I have a stored procedure which contain code like

if () then---update---else if() theninsert --update--------else if()-----------------------end if;end if;end if; 

I have to use this code numbers of times in my procedure , is there any way I can give name this code & use it or call it where I need it in my SP.Don't want to make the above code a separate procedure. 

View 4 Replies View Related

Session Restriction - Limit Number Of Open Application Actions By Some Os User?

Sep 17, 2013

,in 11g,is there a way I could limit the number of open application actions by some os user ?We have an application where users are executing the same thing while the last is not yet finished,so we have several same things runninng at the same time executed by the same user.

Can we restrict that somehow through the database or that needs to be  done through application?

View 4 Replies View Related

Forms :: Block Is Populating Values From Code

Jul 7, 2011

I want to search values with F11.for example i will enter some value and i will press F11.it should be display that record. That block is populating values from code.

View 6 Replies View Related

SQL & PL/SQL :: Create Block Of Code That Would Search In All Tables In Schema For Column_name

Jun 14, 2011

I want to create a block of code that would search in all tables in a schema for a column_name where its data_length is like 4000 let's say. This data_length is actually dedicated for a comment column. If found, all not null column with like 4000 data_length will be changed by string "Comment has been removed". I have the following script below but it seemed lacking.

begin
for rec in (select table_name, column_name from user_tab_columns where column_name like ?data_length? = 4000 order by 1,2) loop
begin
execute immediate 'update '||rec.table_name||' set '||rec.column_name||' = ''Comment has been removed'' where '||rec.column_name||' is not null';
commit;
[code]........

View 6 Replies View Related

SQL & PL/SQL :: Query That Shows Each Building Code / Name And Number Of Rooms

Mar 13, 2013

I have been trying to figure out how to write a query that shows each building code building name and number of rooms from a database with four tables : emp, build, room, roombook

View 9 Replies View Related

Application Express :: How To Soft-code Page Number Portion Of Item Name

Oct 9, 2012

In an Application Procedure, I'd like to reference some items that are local to the current page. Obviously, hard-coding like the following won't work unless it happens to be on Page 25.

:f105_blah := :p25_blah;

So how can I write this line of PL/SQL code so that the "25" is automatically set to the number of the current page?

View 13 Replies View Related

Forms :: Number Of Records Retrieved In Block

Nov 30, 2010

is there any way other than this way to retrieve the number of record displayed in the block ?

last record ;
l := :system.cursor_record

View 1 Replies View Related

SQL & PL/SQL :: Create Counter For The Number Of Inserts Run In A Block

Feb 18, 2010

I have a plsql Proc, which accepts a few parameters and inevitably loops through a cursor and runs a bunch of insert statements. With quite a few IF conditions.

Each insert statement has a value which i want to increment by (+1) every time an insert statement is executed in the same loop.. This is for a student housing database and this is for their room preferences so 1 is the first, 2 is there second preference e.t.c.

Please take a look at the code below: in the Insert values() I have put a? Where I want the number to increment from.

There are a lot more inserts which I haven't put below. I hope I have made myself clear as this has been quite difficult to explain. So for example if the 2nd two inserts are run, then I was the first one to insert with a 1 and the second with a 2.

BEGIN
FOR rec IN c1
LOOP
IF c1%FOUND THEN
INSERT INTO table (PK_A, fk_rms_id, application_type, application_person_type) VALUES (NULL, rec.pk_rms_id, app_type, app_person_type) RETURNING PK_APPLICATION_NO INTO x;
[Code] ........

View 2 Replies View Related

Server Administration :: How To Get Number Of Empty Block

Mar 31, 2012

①SQL> SELECT OBJECT_ID FROM DBA_OBJECTS WHERE OBJECT_NAME='T2012';
OBJECT_ID
---------
57082

②SQL> SELECT HEADER_BLOCK,BLOCKS FROM DBA_SEGMENTS WHERE SEGMENT_NAME = 'T2012';
HEADER_BLOCK BLOCKS
------------- --------
683 8

③SQL> SELECT DBMS_ROWID.rowid_block_number(ROWID)USED_BLOCK_NUMBER FROM SCOTT.T2012;
USED_BLOCK_NUMBER
----------------
684

④SQL> SHUTDOWN IMMEDIATE;

⑤SQL> STARTUP;

⑥SQL> SELECT BLOCK#,CLASS# FROM V$BH WHERE OBJD = '57082';
no data found

⑦SQL> SELECT * FROM SCOTT.T2012;
ID
-----
1

⑧SQL> SELECT BLOCK#,CLASS# FROM V$BH WHERE OBJD='57082';
BLOCK# CLASS#
------- ----------
686 1
684 1
687 1
685 1
688 1
683 4

⑨SQL> SELECT EMPTY_BLOCKS FROM DBA_TABLES WHERE TABLE_NAME='T2012';
EMPTY_BLOCKS
------------
3

QUESTIONS ONE:
in the ⑧ step,why block#685,block#686,block#687,block#688 in the buffer cache after i query data from scott.T2012?

QUESTIONS TWO:
in the ⑨ step,what's the block number of the empty block?just like DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID).

View 2 Replies View Related

Forms :: Retrieve Total Number In Details Block?

May 21, 2011

I am working on form which consist of two block, now i need to know total record in detail block, but in form structure i have multiple details entry aginst 1 master entry and after going for next master entry the details of privious master entry are going for posting that's why i am unable to use the currnt_record function. function to retrive the total number of records in details tab.

View 2 Replies View Related

Forms :: Applying Serial Number In Detail Block

Sep 5, 2011

I have form with master detail relation ship (invoicing form) the detail block is tabular, displaying upto 7 records...

Now my clients wants to show the serial number along with each record while feeding the data (this includes when insert, editing, deleting / clearing records) he wants to see the serial number as in MS access / MS techniques.

I tried to use the system variable to use :system.cursor_record; but this dose not works.(in insert/edit/delete/clear record)

View 5 Replies View Related

Forms :: Handle Huge Number Of Rows In Data Block

Jun 14, 2011

I need to read a huge number of rows, say in lakhs and then need to populate it in data block. Since it is having huge data am never able to run the form. it hangs after some time. when i test with few rows it is working. so no problem in coding.

View 4 Replies View Related

Forms :: How To Count Number Of Items Present In A Data Block

Aug 20, 2011

how to count how many items present in a particular data block in oracle forms 10g.whether it is a text_item or display_item or list_item etc is there any method to do this.

i have written this when-button pressed but the problem is how to get the next item name in the block

DECLARE
V_COUNT NUMBER:=0;
V_FIRSTITEM VARCHAR2(100):='';
BEGIN
GO_BLOCK('BLOCK_ITEMCOUNT');
V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', FIRST_ITEM);
LOOP

[code]....

View 3 Replies View Related

Forms :: Simple Data Block - Serial Number Generation

Jun 2, 2010

I have created simple data block by wizard and taken tabular layout 10 rows and 6 columns

i want to generate serial number on first column .....

what need to use..?

View 11 Replies View Related

Reports & Discoverer :: SQL Union All - Query Block Has Incorrect Number Of Result Columns

Feb 1, 2012

I have the following Union All query. It throws the following error in SQL plus

ERROR at line 27: ORA-01789: query block has incorrect number of result columns

After doing some google for the above error it suggests there are incorrect number of columns in the Union All query.I could not figure out the exact location well SQl Plus says error is on line 27 at the first opening bracket like

(Select distinct c.contact_code

Following is the SQL query

Select
tbl_contact.contact_code,
contact_title
||'.'||contact_name contact_name,
contact_address,
[Code] ......

View 1 Replies View Related

Recovery Manager (RMAN) :: ORA-19599 Block Number 782 Corrupt In Backup Piece

Oct 23, 2012

I'm using database 11g & restore backup from another location.

RMAN> RESTORE CONTROLFILE FROM '/u01/RMAN/forstandby_0acekubq_1_1';
RMAN> catalog start with '/u01/RMAN/';
RMAN> restore database;
channel ORA_DISK_1: reading from backup piece /u01/RMAN/forstandby_09ceku8r_1_1
channel ORA_DISK_1: ORA-19870: error while restoring backup piece /u01/RMAN/forstandby_09ceku8r_1_1
ORA-19599: block number 782 is corrupt in backup piece /u01/RMAN/forstandby_09ceku8r_1_1

failover to previous backup

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 10/23/2012 19:24:11
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

View 1 Replies View Related

Recovery Manager (RMAN) :: ORA-19599 - Block Number 1985 Is Corrupt In Archived Log?

Mar 24, 2013

I couldn't take backup of the RAC database archivelog.

RMAN> BACKUP VALIDATE DATABASE ARCHIVELOG ALL;

Starting backup at 24-MAR-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=+DG1/kvxcprd/datafile/system.260.777756857
input datafile fno=00003 name=+DG1/kvxcprd/datafile/sysaux.268.777756857
input datafile fno=00002 name=+DG1/kvxcprd/datafile/undotbs1.263.777756857
input datafile fno=00005 name=+DG1/kvxcprd/datafile/undotbs2.264.777756983
input datafile fno=00004 name=+DG1/kvxcprd/datafile/users.267.777756857
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=2 sequence=17 recid=26 stamp=810915691
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/24/2013 14:37:11
ORA-19599: block number 1985 is corrupt in archived log +FG/kvxcprd/archivelog/2013_03_24/thread_2_seq_17.269.810915689

RMAN> backup archivelog all;

Starting backup at 24-MAR-13
current log archived
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 03/24/2013 14:39:52
ORA-19563: header validation failed for file

View 4 Replies View Related

Reports & Discoverer :: Bar Code Reader Will Readout Code

Feb 12, 2009

I have no knowledge about Barcode. The problem is an issue of Loyalty Cards of a Hotel and Restaurant to various customers and then these cards will be presented by the customers time to time in the Hotel as well as Restaurant. The Owner of the Hotel and Restaurant wants to generate separate barcode for each card and when this card will be presented then the bar code reader will readout the code and the system will calculate the amount of discount/rebate. Because if the data entry operator enter the code of the card through key board the it will be a chance of leakage or misuse of that card.

View 8 Replies View Related

SQL & PL/SQL :: Compare SVN Source Code With Production Code In Database

May 30, 2012

I have to compare my SVN source code (packages, views etc) with the production code in the database like views etc (actually we are not sure that what we have in the svn is the final version of production code, we have objects created in the production database, but we don't have latest scripts for that. we have to deploy the svn code in the UNIX box).

So here the comparison is between the OS files and the database objects.

I thought I would get scripts of all the packages, views etc from the production database by using DBMS_METADATA or some utility and save the code in OS files then compare one svn file with OS file manually by using some comparison tools e.g toad provide one comparison tool.

View 5 Replies View Related

SQL & PL/SQL :: Type In Code To Make Few Tables Then Run Code

Feb 13, 2012

I downloaded oracle sql developer, i type my code into a worksheet but if i use the run statement option, it asks me to make a connection. I dont want to make a connection, just test the data locally.However, even if I do try and make a connection, i get ora-12560 error (local connection).

I just want to type up some data to make some table and test to retrieve or manipulate the data. I'll use any program, command line or gui.

View 7 Replies View Related

SQL & PL/SQL :: Get More Lines Into One Line?

Jul 31, 2012

how to get more lines into one line per customer.

For instance:

CREATE TABLE XXX_MAPE_CC
(
accounting_month_key number,
customer_key VARCHAR2(18 BYTE),
total_amount VARCHAR2(29 BYTE)
)
insert into XXX_MAPE_CC
values (201205, 313774201, '15,03')

[code]...

And I would like get every total_amount to individual columns by accounting_month_key

--------------------------------------------------------------------------
customer_key month_201205 month_201206 month_201207
----------------------------------------------------------------------------
313774201 15,03 10,03 13,10
----------------------------------------------------------------------------

View 3 Replies View Related

Remove All Of Indentations From Lines

May 16, 2007

In Oracle XE when I run PL/SQL in the SQL Commands window I will sometimes get a "Not found" error. It further reads, "The requested URL /apex/wwv_ flow.show was not found on this server". I found that if I remove all of the indentations from the lines of the PL/SQL code everything will work fine. Talk about a screwy problem. So, if you have that problem just take all of your PL/SQL code and slam it up against the left margin.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved