PL/SQL :: Check Date Of Last Modified Procedure?
Oct 17, 2012 how to check last modified function or procedure.
for example: INVO_75.PCK.PrintInvoices_fct
how to check last modified function or procedure.
for example: INVO_75.PCK.PrintInvoices_fct
I have multiple project databases where their tables are similar. I wanted to know just a single date from each project databases is modified/updated. If I run a query like select * from component order by eng_proj_id, chg_date desc then it will return many records sorted by their eng_proj_id and chg_date in their descending but I only need just a single record with last update from each project databases.
View 13 Replies View RelatedThe requirement is to find the last date when either ATTRIB1 or ATTRIB2 were modified for each ID. There are many other columns in the table, but I'm not interested in other columns.
Test Case
SET LINES 100
SET PAGES 100
DROP TABLE test_log
/
CREATE TABLE test_log
[code]....
Expected Output
ID LAST_CHANGE_DATE
---------- --------------------
11 02-SEP-2012 10:58:32
35 05-AUG-2012 10:58:32
I have written the below query, to get the required output.
SELECT MAX(i_date) last_change_date
FROM
(
SELECT seq,id, attrib1, attrib2, i_date,
row_number() OVER (PARTITION BY attrib1 ORDER BY i_date) rn1,
row_number() OVER (PARTITION BY attrib2 ORDER BY i_date) rn2
[code]....
I have a text column having date data. In the format of YYYYMMDD.Some of the records might have invalid date data as well. Is there any function which checks whether it's value is a right DATE? Something like
IS_DATE(my_text_date,'DD-MM-YYYY')
should return TRUE if it's a valid date.
I have two field date from and date to... i want to enter an employee in date range that range should not be enter again.
View 8 Replies View RelatedI have been tasked to validate the date format of some attributes in a table. So, to verify the data we will be getting the filed and the format to check against.
View 4 Replies View RelatedI have a column defined as Number( 8 ) which is supposed to have date values. I would like to check if all the rows in that table have valid dates. We could use to_date(coulmn_name, 'YYYYMMDD') and catch the rownums for error conditions using pl/sql. I would like to know if we could just do it using sql only and return the row numbers for those that are invalid dates?
View 5 Replies View Relatedi've a problem in using store procedure. My code is to get postcode id when i pass a postcode. First it will check the postcode that i pass if already exist it will get postcode id but if not it will insert new postcode and get a new postcode id created then pass into ASP system. When i try run this stock procedure i got error as below :-
SQL> exec INSERT_PCODE_GMDS
BEGIN INSERT_PCODE_GMDS; END;
*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'INSERT_PCODE_GMDS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
(
Postcode1 IN varchar2,
citiID IN Number,
county_ID IN number,
city_name IN varchar2,
sub_cityID IN number,
pcode OUT number
)
[code].......
in ASP to pass and get back the values i used code as below. but i think the problems occurs in my stock procedure
set cmd=Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = OBJdbConnection
cmd.CommandText="INSERT_PCODE_GMDS"
cmd.CommandType= 4
cmd.Parameters.append cmd.CreateParameter("@poskod",adVarChar,adParamInput,5,poskod)
[code].......
I have to create a stored procedure having some 10 cursors and i have to display the data's fetched by select statement in cursors using dbms_output.put_line().
for ex:
-------
CREATE OR REPLACE PROCEDURE PROC AS
CURSOR C1 AS SELECT * FROM EMP;
BEGIN
FOR R IN C1
LOOP
[code].....
My question is while creating procedure i want to check if the object exist in database or not.
If EXIST
NO PROBLEM MY CODE CREATE THE PROC AND EXECUTED FINE
IF NOT EXIST
I don't want an exception to be thrown stating "OBJECT DOES NOT EXIST" I wanted PL/SQL engine not to execute the particular select statement itself and continue executing other select statements.
The reason why have such kind of wierd requirement is my program displays all the CEMLI objects in any 11.5.10 instance. I don't know whether they have installed discoverer or not. if they installed it no problem else my program have to eliminate.EXECUTE IMMEDIATE, REF CURSOR becoz i tried it and works fine.but not able to wrap in WRAPPER UTILITY 8.0 versions.
I have compiled some procedures, at the time of compilation i saw some warnings & errors but i did not notice, Now can we see that errors or warnings in db console or any other way.
View 7 Replies View Relatedwe have a few profiles in dba_profile. How to check what is the last modification date of the the resources inside each profile.
View 6 Replies View RelatedIs there a seeded function by which I can check all the rows which stored dates in varchar column.
I have a table say test (test_data varchar2(100));
Now I will insert all types of records into the table varchar,number dates and then i will write q query to etch all those records only which has dates only
INSERT INTO test(1);
INSERT INTO test('ABC');
INSERT INTO test(SYSDATE);
INSERT INTO test(TO_CHAR(SYSDATE,'DD-MON-YYYY'));
INSERT INTO test(TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
INSERT INTO test('15/01/2012');
...
commit;
how can i create procedure to check username and password.
View 10 Replies View RelatedI want to put one check box to check all the check boxes.how can i do this?
View 5 Replies View RelatedI have a procedure that accepts a date as an input parameter. This parameter is used in a select statement to match on a table column of date type.
1) Should the parameter be declared and passed in as a varchar2 and then converted using to_date() or declared as a date type? If it's declared as a date type what format should it be passed in as, ie. '01-MAY-2010' or '01-MAY-10' or etc.
2) When I run the sql query, knowing data exist, like "WHERE test_date = '22-NOV-10'" I get no results so I know I'm not matching the date correctly but if I use "WHERE test_date LIKE '22-NOV-10%'" I get the correct results. Trying to build a variable to match this, and use in a cursor, consistently gives me the 'non-numeric character was found...' error
3) formatting the test_date input variable to match on the date type column.
I have need to know the best (least expensive) way to create a stored procedure that creates a new records in a table using a sequence and return the primary key (sequence value) for this inserted record:
CREATE TABLE TEST_A (SERIAL NUMBER PRIMARY KEY, NAME VARCHAR2(20));
CREATE SEQUENCE SEQ_TESTA_PK START WITH 1
NOCACHE
NOCYCLE;
CREATE OR REPLACE TRIGGER TRG_TESTA_PK
BEFORE INSERT ON TEST_A
[code]....
oracle stored procedure which sorts date, meaning the recent records needs to be shown first.
View 6 Replies View RelatedProvide me a query to find the last modified timestamp of all the tables present in a schema?
View 5 Replies View Relatedi have the below query
select to_char(report_date, 'YYYY MM Mon'), count(1) no_of_times
from (
select to_date('&&YYYYMMDD', 'YYYYMMDD')+rownum report_date
, mod(rownum,14) mod_result
from all_objects
[code]...
need to convert as procedure based on input date parameter.I will pass the input date from java environment and need to see the sql query output in front end.
I have created a stored procedure that checks if a file exists and gets a date from the file if it exists. The date is then used as a paramter. See below:
CODEcreate or replace
PROCEDURE "P_Load_Stamp" AS
v_exists BOOLEAN;
v_length NUMBER;
v_blocksize NUMBER;
[code]...
The above codes works perfectly and I scheduled it using SQLPLUS as follows:
CODEvariable jobno number;
variable instno number;
begin
select instance_number into :instno from v$instance;
[code]...
My problem is that I need to pass the date from the above procedure as a parameter to another stored procedure. So I modified my code as follows (the parts in red):
CODEcreate or replace
PROCEDURE "P_Load_Stamp" (vCTIDATE OUT varchar2) AS
v_exists BOOLEAN;
v_length NUMBER;
[code]...
Now it doesn't strike me as a rights issue since I created it in the schem schema. What could I be doing wrong here?
1)How can i know that in a table when i modified a row or deleted a row and which row i inserted when i want to know the particular time
can it is possiable if possiable then tell me how.
2)Is there any difference between 9i merge and 10g merge command ?
i have a sequence for one of my table that this sequence's current value was 3000 yesterday but today when i checked current value of it, i surprised because the value changed to 50, can i check who changed my sequence? is exists any data dictionary that shows logs of modified database objects.
View 3 Replies View Relatedhow to find who modified a package code at last? I can only find the latest modified date with USER_OBJECTS.
View 3 Replies View RelatedI have created a web source with the default settings and pointed it at a test site. The pages being craweled have both last modified response headers and meta tag last-modified being set in the rendered html but the crawler doesn't seem to be indexing the values.
It is indexing and returning last modified on the liked files (i.e. *.doc, *.pdf) but not the actual web page itself.
Am I missing a step? How do I get the last modified meta tag of html to be indexed?
pga_aggregate_target has been incorrectly set to 21gb in one of our databases.
SQL> sho parameter pga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
pga_aggregate_target big integer 21686M
When I try to change it to 1g or 800m I get the following error.
SQL> alter system set pga_aggregate_target=1g scope=memory;
alter system set pga_aggregate_target=1g scope=memory
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00068: invalid value 104850 for parameter smmmax_size, must be between 0 and 0
Whereas when i try to set the scope to spfile it works
SQL> alter system set pga_aggregate_target=1g scope=spfile;
System altered.
Version is 11.2.0.3 on RHEL 5
how I can set the pga_aggregate_target right, I am not sure whether bouncing will work or not since i m doubtful that I may get the same error related to smmmax_size while bouncing with the new pga_aggregate_target.
I have a small question is it possible to find the details of a user who modified the structure of a table, including what command he ran to change the structure of the table?
View 2 Replies View RelatedWe have Forms application created in Oracle Forms Builder version 9.0.4.0.19. We have done modification in some forms and few forms created using Oracle Forms Builder 10g version 10.1.2.0.2.
Now we need to convert those forms which are around 5 or 6 in number to Oracle Forms 9.
I use oracle 9i. After doing execution ,process, how can I know which table in the oracle have been update/modify?
View 18 Replies View RelatedI'm altering a column length to increase the size and getting "ORA-30556: functional index is defined on the column to be modified".
On searching more about this error, it seems like the function index must be dropped before altering the column.The table I'm dealing with is huge.
Question 1:In case of dropping and recreating the index, should the following steps be done:
- Drop Index
- Alter the column to increase the size
- Recreate the index with NOLOGGING and NOPARALLEL clause
- ALTER INDEX to turn on LOGGING
- Gather Statistics on that index
Question 2:Is there anything else that should be done when the index is dropped and re-created?
Question 3:What are the side-effects of carrying out the above steps in a huge table with around 15 million rows?
Question 4:Would it work if I disable the index, alter the column and reenable the index?Do I have to rebuild the index and gather Stats upon reenabling it?
I got an error FRM-40202: Field must be entered. I did some modifications to Standard form by copying it. after that when I selected the first Email check box in the list and then selected the Email button which I created newly for that form.
View 1 Replies View Related