SQL & PL/SQL :: Select Statement To View Transaction Log For Specific Date?

Jul 24, 2011

I'm using Oracle 9i Enterprise edition, Is there a select statement to view transaction log for specific date?

View 1 Replies


ADVERTISEMENT

Server Administration :: Transaction Of Specific Date Locked?

Jan 10, 2010

My transaction of 1 day Jan7,2009 cannot be manipulated by any DML..What shud i do to unlock those records...??

View 10 Replies View Related

Security :: Audit Specific Statement On Specific Table By Specific User?

May 29, 2012

I'd like to know if it is possible to track DML actions issued on a specific table by a specific user, for example , i tried :

AUDIT SELECT on SCOTT.DEPT by HR by ACCESS;

I get an error, where is my syntax error ?

i want to know if it's possible to do it without trigger ?

View 7 Replies View Related

SQL & PL/SQL :: View Not Having ORDER BY Clause In SELECT Statement?

Jun 13, 2010

currently i m going through some dumps for my OCA-11g prep.I came across one sentence :A view cannot have an ORDER BY clause in the SELECT statement.well this statement is false and the explanation given was :

Query operations containing ORDER BY clause are also permitted, so long as the ORDER BY clause appears outside the parentheses.

The following is an example of what I mean: CREATE VIEW my_view AS (SELECT*FROM emp) ORDER BYempno.

but when i tried running the query like this :CREATE VIEW my_view AS SELECT*FROM emp ORDER BYempno ,it worked w/o giving parentheses.

View 5 Replies View Related

Store Procedure In View With Select Statement

Aug 31, 2012

Need a trigger in view with select statement that means

CREATE OR REPLACE VIEW TEST_VIEW AS SELECT * FROM TEST_TABLE;
CREATE OR REPLACE TRIGGER TEST_VIEW_TRG1
INSTEAD OF DELETE ON TEST_VIEW DECLARE
BEGIN
Dbms_Output.Put_Line('STATEMENT TRIGGER.');
END;

i wanted to use select statement instead of delete.How can i get that

View 1 Replies View Related

Date Equality In Select Statement

Sep 3, 2013

Date equality in select statement giving 0 result even table contains record matching to it.

1- select *from  EOE_POC.PRODUCT_TEST_REPORT where CREATE_DATE = '03-SEP-13'  
2 - select *from  EOE_POC.PRODUCT_TEST_REPORT where CREATE_DATE >= '03-SEP-13' 

above query (2nd one) is giving 2 records.But I am intend to check for equality not greater

View 5 Replies View Related

SQL & PL/SQL :: Insert Statement Which Will Commit Transaction By Itself

May 22, 2010

What is the syntax to write an insert statement which will commit the transaction by it self,not using an exclusive commit statement after wards.

View 2 Replies View Related

PL/SQL :: Reset Date In Specific Format (Date / Time)

Dec 23, 2012

I want to reset my date to this format: 12/31/2012 11:59:59 PM - see code below:

DECLARE
v_latest_close DATE;
BEGIN
v_latest_close := TO_DATE ('12/31/2012 23:59:59 ','MM/DD/YYYY HH24:MI:SS');
DBMS_OUTPUT.PUT_LINE('The new date format is : '|| v_latest_close);
END;

the code above displays only : 12/31/2012 instead of 12/31/2012 11:59:59 PM

View 4 Replies View Related

Replication :: Table A - How To Replicate Specific Row Transaction To Table B

Feb 7, 2013

Let's say we have Table - A and we would like to replicate specific row transaction to Table B.

Here are the rows in *Table A*
Time: Lets say 15:00

A1 Just Updated @15:00
A2 Just inserted @15:01
A3

B1 - Daily Delete Row -i.e just deleted a while back - Non scheduled process --executed by application @15:02
B2 -
B3 - Daily Delete Row - i.e just deleted a while back -- Non Schduled process --executed by application @15:05
B4 - Just recently purged (As part of 180 Day purge ) - Scheduled process executed by operations team @15:10
B5 - Just recently purged (As part of 180 Day purge ) - Scheduled process executed by operations team @15:10
B6 -Just recently purged (As part of 180 Day purge ) - Scheduled process executed by operations team @15:10

Current Data in Table B (Before Replication) @15:00

A1 (without updates)
A3
B1
B2
B3
B4
B5
B6

Expected rows in Table B (via replication/snapshot/materialized view / or any other method)

*Replication at 15:30*
Table B - Read Only

Expected rows after replication-

A1 -- Newly updated details
A2 -- Newly inserted row
A3
B1 - Daily delete row is expected to be replicated
B2
B3 - Daily delete row is expected to be replicated

***Note row B4 is not expected to be replicated to table B.

Questions:

1) How can we get updates, inserts and daily deletes replicated while ignore large purges?
2) How can large purge changes be reflected in replicated tables as well without deleting daily deletes?

View 6 Replies View Related

SQL & PL/SQL :: Identify Due Date For A Transaction - Working Days

Jul 5, 2011

I need to identify a due date for a transaction (date) that should be completed within 15 working days from the date of the transaction date. For example, a request is submitted on Wednesday, December 29th 2010. This request should be then 'answered' on Thursday, January 20th 2011 at the latest.

I have a table that identify the status of every calendar day between 1960 to 2060; fields are: calendar day, calendar year, ..., day of week, week day flag, holiday flag.

In my example above, January 1st and 2nd are weekend days and Monday, January 3rd is an holiday.

How do I go getting all (calendar day + 15 working days) for all days of the year?

View 2 Replies View Related

SQL & PL/SQL :: Select Statement From Schemas In MERGE Statement In USING Clause

Sep 13, 2013

In the following merge statement in the USINg clause...I am using a select stament of one schema WEDB.But that same select statement should take data from 30 schemeas and then check the condition below condition

ON(source.DNO = target.DNO
AND source.BNO=target.BNO);

I thought that using UNIONALL for select statement of the schemas as below.

SELECT
DNO,
BNO,
c2,
c3,
c4,
c5,
c6,
c7
[code]....

View 5 Replies View Related

SQL & PL/SQL :: Change View Definition When Select Is Running On That View

Apr 25, 2012

We wrote one data load process to load GZ files into Database.during process we will change client facing view definitions to backup table so that we can work on base tables.

This view definition changes are related to FROM and WHERE clause (not columns/type). during load process, client/user may connect to current server and accessing these views. My question is what will be the reflection of changing view definition while user is accessing view?

I created a scenario-
STEP1: Created a view-
create or replace view view_01 as
select object_name from dba_objects union all
select object_name from dba_objects union all
select object_name from dba_objects union all
[code]....

View definition is replaced by new definition while select is executing on that view. select returned number of records as per view definition one.

View 6 Replies View Related

SQL & PL/SQL :: Query Only Specific Date Only

May 6, 2010

query only specific date only. example: '06-MAY-2010'.

1.from the statement below, it will display out more than 06-mAY-2010.

2.if i want more the date from 03-MAY-2010, 04-MAY-2010 and 05-MAY-2010.

select * from PNG_ORA_SERVER_PERF where SERVER_NAME = 'MLYDESPINTF1' and DATE_TIME >= TO_DATE('06-MAY-2010','DD-MM-YYYY');

View 3 Replies View Related

SQL & PL/SQL :: Select Dynamic Column Names In Select Statement In Function?

Jul 4, 2010

i want to select dynamic column names in my select statement in my function.

View 4 Replies View Related

SQL & PL/SQL :: Select Specific Number Of Rows By Each Value

Oct 17, 2012

This is what I've been trying to do.

I have the following table:

FOOTBALL PLAYERS < ID, NAME, ATTRIBUTE>
100-JIM-TALL
101-BOB-STRONG
102-MARK-SMART
...etc

I want to form a query that regardless of the total returned records, I will be able to specify how many of each "kind" of players I want returned. There are several good reasons that it has to be one query and not many.

View 4 Replies View Related

SQL & PL/SQL :: Select Statement Is Blocking A Delete Statement

Jan 11, 2012

I am using JDBC to run a few queries from my Java program (multi-threaded one).I am facing an issue where a select statement is blocking a delete statement. From the java code point of view, there are 2 different threads accessing the same tables (whith different DB connection objects).

When the block occurs (which i was able to find out from the java thread dump that there is a lock on oracle), the below is the output:

SQL> SELECT TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI:SS')
2 || ' User '||s1.username || '@' || s1.machine
3 || ' ( SID= ' || s1.sid || ' ) with the statement: ' || sqlt2.sql_text
||' is blocking the SQL statement on '|| s2.username || '@'
4 5 || s2.machine || ' ( SID=' || s2.sid || ' ) blocked SQL -> '
6 ||sqlt1.sql_text AS blocking_status FROM v$lock l1, v$session s1, v$lock l2 ,
7 v$session s2,v$sql sqlt1, v$sql sqlt2
8 WHERE s1.sid =l1.sid
9 AND s2.sid =l2.sid AND sqlt1.sql_id= s2.sql_id
AND sqlt2.sql_id= s1.prev_sql_id AND l1.BLOCK =1
10 AND l2.request > 0 AND l1.id1 = l2.id1 AND l2.id2 = l2.id2;
[code]...

From the above it can be seen that a select statement is blocking a delete. Unless the select is select for Update, it should not block other statements is not it ?

View 10 Replies View Related

SQL & PL/SQL :: How To Convert Date To Specific Format

Oct 11, 2012

i am using one stored procedure where in one variable which is declare as date value is coming like that '10-OCT-12 11.30.54 AM' and i am inserting this value in one table which has one column vdate with date datatype but it is not inserting there.

View 16 Replies View Related

PL/SQL Hierarchical Query - Select Data In Specific Way

Apr 19, 2013

I have a table that has hierarchical data within it. I need to select this data in a specific way, showing the hierarchy.

E.g. Data in table (Key is unique)

Lvl KeyParKey HasChild
1k101
1k200
1k301
1k401
2k34k10
2k22k11
2k24k10
2k13k30
2k52k30
2k35k30
2k13k30
2k11k40
3k56k220
3k109k221
3k67k220
4k61 k1090
Etc etc....

That�s generally the format the values would appear in the table if I just did a standard select. I want it displayed in a more hierarchical Parent � child way.

The format I need to get out is as follows:
Lvl KeyParKey hasCh
1k101
2k34k10
2k22k11
3k56k220
3k109k221
4k61 k1090
3k67k220
2k24k10
1k200
1k301
2k13k30
2k52k30
2k35k30
2k13k30
1k401
2k11k40

View 1 Replies View Related

PL/SQL :: How To Select Substring In Oracle Up To More Than One Specific Character

Nov 12, 2013

How to select a substring in oracle up to a more than one specific characterfor ex : 121.051^NP: FAMILY PRACTICE  ( trim the values before ^ )            121.051^*NP: FAMILY PRACTICE (trim the value before *). with below function I can only get rid of ^ , I want both the specific characters ^ and ^* to be removed at the same time.   

SUBSTR(p.phys_sub_grp_2_desc,INSTR(p.phys_sub_grp_2_desc, '^') +1)

View 7 Replies View Related

SQL & PL/SQL :: Date Values Are Not Stored In Specific Pattern

Oct 15, 2010

I have a date column, where the date values are not stored in a specific pattern. following are the sample value from the column.

8/10/10 12:00 AM
9/22/2010 1:00AM
01/01/2001
9/1/10 6:00 PM
9/22/2009 1:00AM

i want to convert this to a standard format, 'dd/mm'yyyy'.

View 14 Replies View Related

Performance Tuning :: AWR Report For Specific Date

Jun 4, 2010

I want to take AWR report at specific date ex(25-05-2010).

View 2 Replies View Related

SQL & PL/SQL :: Selecting Specific Date / Time Range?

May 8, 2013

I want to select a specific date/time range in a query. I want to select from 6 AM yesterday through 6 AM today. I know that CURRENT_DATE - 1 will give me yesterday, and I can search between that and the current_date. However, how do I incorporate the specific time in the query?

View 4 Replies View Related

Separate Date Format For Specific Columns In A Database

May 25, 2011

As we know that date datatype can store both date part and time part. If I specify the Date format for my database as 'DD-MM-YYYY HH@$:MI:SS' can i ensure i anyways for a particular columns in the database containing date values the format is 'DD-MM-YYYY' i.e without the time part.Can we specify seperate date formats for specific columsn in database during table creation?

View 1 Replies View Related

Forms :: How To Pull Off Report From Builder 6i Within Specific Date(s)

Sep 9, 2011

SQL Plus version Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
PL/SQL Release 8.0.5.1.0 Production
Forms Version : 6i
Reports Version: 6i
O/S : Microsoft Windows Xp professional Version 2002 Service Pack 3

With regards to the above version description here is my query. I have a form which calls report it accepts various parameters like date between, appeal and so on . I want the report to be restricted to the date parameter as passed by the user.Here is my coding which runs report

Declare
Pl_id ParamList;
where_cond varchar2(2500);
Begin
------------Appeal------------------
if
upper(ltrim(rtrim(:appeal)))<> 'ALL' then
where_cond:= where_cond ||'and tbl_donation.appeal_code='||ltrim(rtrim(:blk_ihelp.appeal_code));
else
where_cond:= where_cond||' and tbl_donation.appeal_code is not null';
end if;

-------------Date Option----------------
if
:date_option is not null then
if
:date_option = 'BETWEEN'then
where_cond:=' and tbl_donation.donation_date between '''||ltrim(rtrim(:fdate))||''' and ''' ||ltrim(rtrim(:tdate))||'''';
else
where_cond:=' and tbl_donation.donation_date '||:date_option||''''||ltrim(rtrim(:fdate))||'''';
end if;
end if;

--------------Country-------------------
if
upper (ltrim(rtrim(:country))) <> 'ALL'then
where_cond:= where_cond||'and tbl_donation.country_code='||ltrim(rtrim(:blk_ihelp.country_code));
else
where_cond:= where_cond||'and tbl_donation.country_code is not null';
end if;

-------------Contact Code---------------
if
:contact_code is not null then
if
:contact_code = 'BETWEEN'then

[Code]....

View 1 Replies View Related

SQL & PL/SQL :: Why Blind Select Is Better Than Conditional Select Statement

Dec 29, 2010

Why Blind select is better than Conditional select Statement?

View 10 Replies View Related

SQL & PL/SQL :: Insert Into Statement Doesn't Insert All Rows Return By Select Statement?

Jan 12, 2011

If i inserted the values in table it gets inserting very few rows only.I dont know y it is?

View 15 Replies View Related

SQL & PL/SQL :: View Statement Generated By Client

Nov 4, 2011

My need is to view sql statement and its explain plan generated by client (Business Objects). How do I perform it? Since it's developer's server I have sufficient rights, I just don't know particular table name.

View 2 Replies View Related

SQL & PL/SQL :: How To View Full Statement Of Creating Function

May 24, 2011

I executed the following statements

SQL> CREATE OR REPLACE Function test
2 ( name_in IN varchar2 )
3 RETURN number
4 IS
5 cnumber number;
6
7 cursor c1 is
[code]....

how I can view the full statement of creating the function.

View 1 Replies View Related

If Statement In Select?

Mar 22, 2013

simply select and works great:

select 'CARAT Issue Open' issue_comment, i.issue_id, i.issue_status, i.issue_title, i.ISSUE_summary ,i.issue_description, i.severity,gcrs.Area_name, gcrs.sector_name,

substr(gcrs.stream_name,1,case when instr(gcrs.stream_name,' (')=0 then 100 else instr(gcrs.stream_name,' (')-1 end) ISSUE_DIVISION,

case when gcrs.STREAM_NAME like 'NON-GT%' THEN 'NON-GT' ELSE gcrs.STREAM_NAME END as ISSUE_DIVISION_2

from table(f_carat_issues_as_of('31/MAR/2013')) i inner join v_gcrs_with_stream gcrs on i.segment_id = gcrs.segment_id

where UPPER(ISSUE_STATUS) like '%OPEN%'

Now I want to callte two columns:ISSUE_DIVISION and ISSUE_DIVISION_2

if they are equal in new columns should be value 1 if are not equal should be 0,how can I do it ?

View 4 Replies View Related

Select One Row From A View

Dec 7, 2006

I am using some UPS shipping software that imports shipping information based on an order number that the user enters and we are having performance problems. In the software's configuration you choose one database object (namely a table or view) to get the information from. I have created myView that selects from multiple tables, lookup tables, etc. I must use a view because the software only has the ability to add a " and <importKeyThatIHaveDefined> = <valueEnteredByUser>". For instance " and order_number = 123". It cannot join multiple tables, etc. The address_field1 info is the same for each record with the same order_number so I can just get the first row (or any row with order_number = <enteredOrderNumber> for that matter).

When I first looked at this it was created as something like this:

select order_number, line_number, order_number || '' || line_number as ol, address_field1 from order;Keep in mind that there are more than just this table and more fields selected. They are all joined correctly (for lookup values etc.).

The concatenation was determined to be the bottleneck in performance. ol was defined as the import key to be used and the users were just entering the order number plus a 1 to get ONLY the first line number. Each order (usually) has more than one line and even the line number is not necessarily unique for each order. For instance, order 123 may have line 1 twice and line 2 once.

select order_number, line_number, address_field1 from order where rownum = 1;

The software appended the " and order_number = 123" as expected but because rownum = 1 had already been executed (before the and order_number = 123" the view only returned one row even WITHOUT the order_number = 123.

I need to return only ONE row for a given order number EVEN IF there are multiple records with the same order_number and line_number. Using "where order_number = <enteredOrderNumber> and line_number = 1" is not necessarily unique so that won't work.If I can't make it work this way and can't use the rownum = 1 what options do I have?

View 7 Replies View Related







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