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


ADVERTISEMENT

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 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

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 :: Give New ID To Existing Employee?

Mar 13, 2012

want to create a PL/SQL procedure, update_id(id_emp in number), that gives a new id_emp (id_emp=y) to an existing employee (id_emp=x).So before updating the EMP table, we have to :

1- create a new row on EMP(with id_emp=y) that has the same informations of the employee (id_emp=x),
2- update all tables that contains the id_emp column (update <TAB> set id_emp=y where id_emp=x),
3- delete employee (id_emp=x).

The problem is in step 2 : it creates a lot of locks and makes the DB unusable.To deal with this problem, I thought for many solutions, but the problem is how to implement them correctly and efficiently.

Before executing step 2, we have to ensure (through a marker I guess) that all the tables that have the id_emp column, are managed by our session, and any other acces (through SELECT, UPDATE, DELETE, INSERT statment) from another session will be rejected since we have a marker on that table.

When step 2 ends, we release all the tables from the markers.

My simple question : how to achieve this ?

View 12 Replies View Related

Forms :: How To Give Hyperlinks

Jan 14, 2012

i would like to give a hyper link in forms. how it possible, any way to do it.

View 8 Replies View Related

SQL & PL/SQL :: Give Select Grant For Few Tables?

Jul 8, 2010

I created a user and granted connect,resource priviliges. I gave access to this user for only 5 tables. when i check it later, other tables are also given access. How can i avoid this and give access to selected tables.

View 9 Replies View Related

PL/SQL :: How To Give A User Administrative Permissions

Oct 15, 2012

Suppose I using "scott" user, I need to give administrative permissions to scott. How can I give??

View 6 Replies View Related

SQL & PL/SQL :: Give Access Only On 10th Row For Schema2

Mar 26, 2010

I have two schemas.In schema1 i hava a table with 20 records,i want to give access only on 10 th row for schema2.

View 6 Replies View Related

PL/SQL :: How SQL Queries Act In Back End To Give The Result

Jul 22, 2013

When we are running a query it is giving us the result based on the conditions .But to know what exactly is happening in the database when we are running a query against it and how finally it returns the result.

View 1 Replies View Related

How To Give Table Name Dynamically In A Select Query

Aug 23, 2012

I have 12 different tables

Record_jan
Record_feb
.
.
.
Record_nov
Record_dec

Based on the month i need to do some i/o operations from these table.

For eg: If it is january then Record_jan table should be accesed or for nov Record_nov table should be accesed.

If I try to store the table name in some variable and then give the variable name in place of table name then it gives error.

var:=Record_month;
Select * from var;

this gives error.

View 3 Replies View Related

Server Administration :: Alter SGA But It Give Error?

Dec 9, 2010

I try to alter the SGA it give me error The Steps which I do show sga

Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes

[code]...

View 5 Replies View Related

SQL & PL/SQL :: Query That Will Give List Of Views Using Three Tables?

Aug 16, 2011

I wanted a query that will give me the list of views using three tables

when i fire

select * from dba_views where text like '%SELECT%';

it is giving me error as expected number got long.

View 2 Replies View Related

Forms :: Multi Data Block And Checkbox Field Based On Control Block

Nov 19, 2010

i have multi data block filed. and checkbox field which based on control block...My task is when i check checkbox only one field should enabled and my mouse goes to that field

e.g

item11 item21 item31 chkbox1
item12 item22 item32 chkbox2

Scenario like this :

My item field based on data block and checkbox based on control block,while i checked chkbox1 , only item31 on that current record should be enabled and i changed value only on that field

when i checked chkbox1 , my cursor goes to item31...not item32

View 12 Replies View Related

Forms :: Distribute Master Block Total Amount In Detail Block Line Wise

May 5, 2012

i have a master detail form, In Master block we have one field cheque amount and in Detail block we have field receiveable amount invoice wise. if company paid us a cheque amount we will enter this amount in Master block field Cheque amount and in detail block there will be invoice wise receivable amounts. i want to distribute the cheque amount in detail block invoice wise for example

Cheque amount in master block = 291

Invoice wise receiveable amount is as follows

Invoice No , receivable amount , Received amount

10, 196 , 0
20 , 95 , 0
30 , 54 , 0

Result should be as follows:

Invoice No , receivable amount , Received amount

10, 196, 196
20 , 95 , 95
30 , 54, 0

Received amount field should be distributed according to the receivable amount when recevied amount = cheque amount then remaining will be 0.

View 2 Replies View Related

Backup & Recovery :: Error / Corrupt Block Relative Dba / 0x01c12a58 (file 7 / Block 76376)

Jan 25, 2011

i have an error with block corruption

Error: Corrupt block relative dba: 0x01c12a58 (file 7, block 76376)

What all the ,methods I can go for if we are working on a production environment with out any down time.

I can go for dbms repair package and restore and recover

View 3 Replies View Related

Which Query Give Lock Conflicts History In Database

Aug 29, 2013

I would like to know 2 days back lock conflicts session information which user held the lock,sql text,when the lock released. any sql query or view in oracle 11g db.

View 1 Replies View Related

Server Administration :: How To Give Full Access To Other Schema

Apr 15, 2012

I want to get clear with one thing yesterday i installed oracle9i and dev 2000 to my client.

when they run one report they got stuck with pl/sql compilation errorrep-1247

when i checked that report in the report builder, in the query they are using some other table which is not belongs to that schema,then I give that schema.tablename and compiled, but this is coming for other reports also, then only i came to know that they are acceessin other schema also, how can i sort this out.

can i fix this by givin full access privilige or what privilige can i give to get full access of other schema table.

how can i check in the old database what are all the roles and privileges given to this user,

View 5 Replies View Related

SQL & PL/SQL :: Give Grant To Schema Of Different Versions Of Oracle Databases?

Aug 8, 2012

I have a task assigned to "grant select on sys.link$" to a user which exists on 500 different databases.

This needs to be done in Oracle database.

View 6 Replies View Related

SQL & PL/SQL :: How To Give Username And Password When Calling HTTP Page

Apr 16, 2013

I have this code when i run this I get credentials error. How to give credentials .The authentication is set to windows in the https page. Means pop up will appear to get the credentials

declare
req UTL_HTTP.REQ;
resp UTL_HTTP.RESP;
value varchar2(1024);
p_url varchar2(4000);
OPT varchar2(1000);
BEGIN
dbms_output.put_line('');

[code]....

View 1 Replies View Related

SQL & PL/SQL :: Using INSTR In Where Clause To Give COMPLETE MATCH Strings?

Dec 9, 2011

We have a SSRS Front end screen which sends multi-select column values as comma separated strings to back end ( Oracle 10g) procedure .

The procedure builds the string by inserting single quotes in the following manner.

P_BU_LST is the parameter which have comma separated values

'1234,3456,4577' i.e, BU ids selected by user in front end
the procedure inserts single quotes to this paramer value

i.e., '1234','3456','4577
v_bu_lst := '''' || REPLACE(v_selbu, ',', ''',''')|| '''';

This is used the where clause of the REF CURSOR SELECT query which send the data back to SSRS

ie.,
SELECT BU.*
FROM BU_DETAIL BU
WHERE INSTR(V_BU_LST,BU_ID) <> 0;

INSTR has a chance to fail in this scenario if the value send from the front end is 123456,3456,4577

here 123456 does not exist in table, but it will be true for INSTR and values 1234 from table will be send back to SSRS which is wrong. Earlier I was using a function to convert the comma separated values to multi-rows and treat it like a lookup table.

But the main table has around million records , and each row has to processed against each row of lookup table, which makes it slower. To avoid this I used INSTR which is faster but can give wrong results.

View 8 Replies View Related

PL/SQL :: DBTIMEZONE To Give +00:00 Since Sysdate Returns As UTC Date Time

Oct 4, 2012

I am using Oracle 11g .when i query

select sysdate from dualit returns the current UTC date and time as output.

But when i query

select DBTIMEZONE from dual it returns -07:00 which indicates PDT.

i am wondering is this correct behaviour, i am expecting DBTIMEZONE to give +00:00 since sysdate returns as UTC date time.'

View 5 Replies View Related

PL/SQL :: Give ROLE Access To Users In Developer Tool?

Oct 5, 2013

How to give ROLE access to users in PL/SQL developer Tool..??

View 3 Replies View Related

RMAN :: Give Output File Location In Crontab Using ( > )?

Aug 2, 2013

I need to take RMAN full backup by every Sunday night and Wednesday night . I have the netbackup script which will take the backup to media. 

Question is:1. We have 15 - backup scripts for 15 DB in that server , so if i configure crontab for backup do i need to give all 15 scripts one by one or (*) will work .    ie) 00 20 * * 3,7 /app/oracle/rman/scripts/hot_db_<sid>.sh    

instead of this if i give  :  00 20 * * 3,7 /app/oracle/rman/scripts/hot_db_*.sh then it will works fine or not ? 2.

Already my backup will create .output file in the same location , do i need to give output file location in crontab using ( > ) ? 3.

Is the above crontab timing is correct ? (3,7) for Wednesday and Sunday 8pm? so Sunday is 0(zero) or 7 ?

View 6 Replies View Related

PL/SQL :: How To Give Space Delimited Input Values In A Query

Dec 21, 2012

Example:

select * from emp
where empno in (123 234 345 124)

View 6 Replies View Related

Forms :: How To Read Values In A Multi Record Control Block Using Pre-insert Trigger (block Level)

Jul 24, 2010

I have a multi record control block (basically a text item displaying 6 records) where user enters values and I want to process the values using pre-insert trigger.

I want to read value in each record and then do some tasks using a pre-insert trigger before I commit the values. To navigate between the records I was using first_record, next_record, clear_record built-ins but it gives errors like "40737-illegalrestricted procedure next_record in pre-insert trigger".

View 3 Replies View Related

Application Express :: 4.1 Restful Services Give HTTP 404 If Cookie Is Not Sent Along

Nov 12, 2012

When I call a classic report that is exported throuh restful webservice, result depends on whether I also send cookie or not. In the first case, access is enabled, in the latter case, HTTP 404 is returned.

Restful access is enabled in the instance. Having an app with ID=101, page 9901 that is public, a classic report called MYREPORT on the restful side, the following call is issued:

/apex/apex_rest.getReport?app=101&page=9901&reportid=MYREPORT_ID&parmvalues=123445&output=json

If my browser send the cookie below with the request, I get back the result. If I delete the cookie from my browser, the result for the exact same apex_rest call is HTTP 404: Not found.

Cookie: ORA_WWV_USER_64731425336707=04893186A373057F5F1E1FCCD33113FA; PUBLIC_ORA_WWV_USER_64731425336707=-1; ORA_WWV_REMEMBER_UN=MYNAME:myworkspace

Details on my configuration is as follows:

Database: Oracle XE 11g, 11.2.0.2.0
Apex version: 4.1.1.00.23_en
Platform: Linux x64
HTTP is handles by XEXDB as folows from lsnrctl status:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kivi.omikk.bme.hu)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...

View 2 Replies View Related







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