PL/SQL :: Find Invalid Date And Month Not Match With Calendar?

Mar 21, 2013

I want to find the row with invalid day, month which are not matching with calendar day and month. Also the program should capture the data if the year <1900

with xx as
(select 101 as ID, '24/05/1899' as create_date from dual
union all
select 101, '32/03/2012' from dual
union all
select 102 ,'30/02/2012' from dual
union all
select 101 , '29/02/2013' from dual

[code]...

View 16 Replies


ADVERTISEMENT

SQL & PL/SQL :: Find Out Date Difference In Day-month-year?

Jul 8, 2010

i want to find out difference between two dates in day-month-year. How can i do it?

For example how many days,months are years are between '01-jul-1979' and '08-jul-2010'

View 4 Replies View Related

Security :: How To Find Out Date View Status Changed To Invalid

Mar 10, 2011

We are trying to audit a view. We are currently seeing that view in production instance and trying to find out when exactly it got invalidated.

View 4 Replies View Related

PL/SQL :: Calendar Month Dates In Horizontal Line

Aug 14, 2012

Is there anyway to show calendar month dates in horizontal line?

First line will have dates and then second line will have day i.e Sat, Sun, Mon.......

1 2 3 4 5 6 7 8 9 ........31

View 12 Replies View Related

SQL & PL/SQL :: Find A Match Within String And Compare?

Aug 2, 2012

Below is a column 'ADDR' with the data (single column)

ADDR
--------
/shared/Folder_1 :^BIAdministrator:^BIAuthor:^BIConsumer:BISystemUser:OracleSystemUser:System:weblogic: :F

[Code]....

View 2 Replies View Related

Application Express :: How To Put More Than Date Per Row On Calendar

Jun 11, 2013

I have a table with  ID_ITEMITEM_NAMEITEM_DEV_DATEITEM_PROD_DATEITEM_TESTING_DATE 

I need to put the ITEM_NAME+'DEV', ITEM_NAME+'PROD', ITEM_NAME+'TESTING' on one calendar,

the calendar provided by APEX is supposed to ask one date per item, so how I can put more than a date per item?  So for example

ITEM ITEM_NAME='Release 1'ITEM_DEV_DATE='15-May'ITEM_TESTING_DATE='21-May'ITEM_PROD_DATE='30-May'

View 1 Replies View Related

Forms :: Calendar (Date Picker) In Form6i

Mar 9, 2011

I want to add a date picker calendar on my form on the date field. I learned that process in institute but now forget the process.. Tell me the process and share the calender and standard file.

View 4 Replies View Related

SQL & PL/SQL :: Increment Sequence Not Based On Calendar Date?

Sep 24, 2013

i need to be increasing the sequence no by 1 for every calender date.For example lets say if i receive 5 dumps of data for 24/09/2013 it should be as below. For next day the 25th the sequence no should again begin with 1.

24/09/2013 1
24/09/2013 2
24/09/2013 3
24/09/2013 4
24/09/2013 5

25/09/2013 1

View 6 Replies View Related

Forms :: How To Attach A Calendar To Date Item

Dec 12, 2009

I am new to the Oracle forms,i want to attach a calender to my form. I followed the below process:

--> I have attached the LOV&Record Group of the item for which the calender is attached as ENABLE_LIST_LAMP LOV which is included in the TEMPLATE.fmb
--> Set the validate from list to 'NO' in the property palette
--> Then after in the trigger KEY_LISTVAL,wrote the code

calendar.show;

while compile the form i got an error component 'SHOW' must be declared

View 6 Replies View Related

PL/SQL :: Convert Date - Persian To Georgian Calendar

Oct 20, 2013

How  to set date persian to georgian calender.

View 1 Replies View Related

SQL & PL/SQL :: Required Data For Month To Date And Year To Date?

Apr 30, 2012

I want to get data for month to date. For example, If I pass today or any day date as parameter then i should get data for that month(month of passing date) up to passing(parameter) date. As well as i have to get year to date.For example, If I pass today or any day date as parameter then i should get data for that financial year(year of passing date) up to passing(parameter) date. how to get month to date and year to date data.

View 3 Replies View Related

Application Express :: How To Populate Date Picker Value In Calendar Region

Jul 2, 2012

I have a calendar region based on a simple query from a table which has date and name columns. The calendar type is monthly with 3 buttons - previous, today & next. It works perfectly.

I have added a date picker in a calendar region now. If i choose any date, the calendar month should be refreshed accordingly. Ie... by default it would show July 2012 month. When i choose the month as March 2012 in the date picker, it should show March month data.

View 0 Replies View Related

UPDATE Date / Literal Doesn't Match Format String

Nov 29, 2007

When I try to update a date column with this:

 UPDATE
        event_request
    SET
        REQ_EVENT_DATE = TO_CHAR(REQ_EVENT_DATE - INTERVAL '1' HOUR, 'yyyy-mm-dd hh24:mi')
    WHERE
        eventID=123 

Oracle returns this error:

 ERROR at line 4:ORA-01861: literal does not match format string 

where line 4 is REQ_EVENT_DATE = TO_CHAR(REQ_EVENT_DATE - INTERVAL '1' HOUR, 'yyyy-mm-dd hh24:mi').The REQ_EVENT_DATE field was originally populated with this stripped down query:

$date = '2007-12-25 08:35'; INSERT INTO (REQ_EVENT_DATE) VALUES (to_date('$date', 'yyyy-mm-dd hh24:mi'));

So - what is wrong with the UPDATE query?

View 1 Replies View Related

Client Tools :: Date Format And Calendar Type Are Not Changing In Oracle Form?

Oct 30, 2011

i have changed date's format and the calendar type in sqlplus through the following command so the date's format and the calender type both changed successfully and work, but in oracle form the they haven't changed.

alter session set nls_calendar='persian';

ALTER SESSION SET NLS_DATE_FORMAT='YYYY/MM/DD';

ALTER SYSTEM SET NLS_DATE_FORMAT='YYYY/MM/DD' SCOPE=SPFILE;

Note: i know session would change the format temporally but i want to change it permanently so i tried alter_system but still no result

View 2 Replies View Related

SQL & PL/SQL :: Find Last Day Of Given Month?

Sep 25, 2012

I am facing a problem to find the last day of the month which is stored in a variable. i tried the following query which gave me an appropriate answer

select to_char(last_day(sysdate),'DD-MON-YY')from dual

ans : 30-SEP-2012

But I am having only the month in my hand through which I want to find its last day. I cant use sysdate for my query.

View 2 Replies View Related

SQL & PL/SQL :: Find Out First Thursday For Each Month

Feb 13, 2013

How to find out first thursday for each month in year.

View 7 Replies View Related

PL/SQL :: Function To Find Nth Month Name (V 10g)?

Sep 17, 2013

find the last nth month name [Single month].

View 5 Replies View Related

SQL & PL/SQL :: Query To Find Last 6 Month Records?

Aug 23, 2010

SELECT HISTORY_ID ,SUM(MISSED_SCHOOL) AS MISSED_SCHOOL,SUM(MISSED_SCHOOL_LAST) AS MISSED_SCHOOL_LAST
FROM EMRASTHAMAHISTORYDETAILS
WHERE ------
GROUP BY HISTORY_ID

There is no date column in table using sysdate alone need to retrieve last 6 month records

how to use in where condition

View 13 Replies View Related

SQL & PL/SQL :: Find Given Month Already Exists In Database

Apr 3, 2011

if i have data like this

case 1
code start month end month
winter march march
summer april january
spring feburary feburary

case 2

winter January January
summer february september
spring october december

and if i am trying to enter again start month and end month . i should validate if the month i am giving is already present in the table for any of the season

i want a do the validate with a query so that i will not enter duplicates.

View 5 Replies View Related

PL/SQL :: Query To Find Number Of Days Across Each Month

Oct 1, 2012

We have a requirement where we need to pay allowance for the employees based on their number of working days. Say for example if an employee worked from 03/Mar/2012 to 05/Apr/2012.

We have a fixed value for per month 300 Dirhams. But the Number of Days on March s 31 and Number of days in April is 30. So per day allowance for March day would be 300/31 and April would be 300/30.

We are looking for logic opr query which calculates first eh number of days in each month ( across months) and then calculate as below

Number of Working days in March is 31 - 3 + 1 = 29

Allowance A1 = (300 * 29 )/31

Number of Working days in April is 5 ( this also needs to find logical I am guess )
Allowance A2 = (300 * 5 )/30

Then A1 + A2.

The A(n) would be the total allowance where provided the number of month across.

View 10 Replies View Related

PL/SQL :: How To Get Min Date Of Every Month For Six Months

Mar 25, 2013

I have data like this.

Process_date SEQ_No
------------- ---------
16-MAR-13     733
09-MAR-13     732
02-MAR-13     731
24-FEB-13     730
16-FEB-13     728
09-FEB-13     727
02-FEB-13     726
26-JAN-13     725
21-JAN-13     724
12-JAN-13     723
05-JAN-13     722
29-DEC-12     721
24-DEC-12     720
15-DEC-12     719
08-DEC-12     718
03-DEC-12     717
22-NOV-12     716
17-NOV-12     715
10-NOV-12     714
03-NOV-12     713
29-OCT-12     712
23-OCT-12     711
13-OCT-12     710
05-OCT-12     709
28-SEP-12     708
22-SEP-12     707
15-SEP-12     706
08-SEP-12     705
01-SEP-12     704

every month admin will refresh actual data table and automatically this above table will update with unique seq_no and process_date.

I need to extract min date of every month(First refresh of last 6 months - excluding current month) and also seq_no related to that month so using joins(using seq_no - that is available in main table) i can combine actual data.

I need result like:

02-MAR-13     731 ( I don't need MAR as it should not take current month data)

so i need final result like below:

02-FEB-13     726
05-JAN-13     722
08-DEC-12     718
03-NOV-12     713
05-OCT-12     709
01-SEP-12     704

View 8 Replies View Related

Find List Of Tables Inserted / Updated In Last 6 Month

Oct 7, 2012

I tried to find out recently updated table list. I couldn't find anything.

CODE>> JUST SAMPLE  TRANSACTIONS >>

SQL> conn sam
Enter password:
Connected.

SQL> select * from tab;
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BIN$y1TXhcjGApvgQAB/AQBOpA==$0 TABLE
TAB1                           TABLE
[code]........

View 1 Replies View Related

SQL & PL/SQL :: Query To Find Missing Dates Between Two Columns In Given Month?

Sep 26, 2012

I need query to find the missing dates between two columns in given month.

CREATE TABLE emp_shift (
empno NUMBER(4),
fr_date DATE,
TO_DATE DATE,
shift VARCHAR2(1));
CREATE TABLE emp (
empno NUMBER(4)
);

[code].....

Required output is

MISSING_DATES EMPNO
---------------------- ----------
09-SEP-12 TO 11-SEP-12 7499
23-SEP-12 TO 26-SEP-12 7499
01-sep-12 TO 30-SEP-12 7521
01-sep-12 TO 30-SEP-12 7788

View 8 Replies View Related

Specify Month Start And End Date In Query?

Oct 27, 2008

I want a monthly report where the month wise sum of qty should be displayed in a row for last 12 months. I need to specify the month start date and end date in the query to pick the sum for the particular month. How can i do it in a SQL query?

SUM(decode(to_char(t1.trx_date,'mm/rrrr'),
to_char(add_months(SYSDATE,
-1),'mm/rrrr'),
nvl(t2.quantity_invoiced,
0))) AS qty_01
from t1,t2
where t1.col1=t2.col1

instead of sysdate i have to use start and end of month. Also i am using group by clause on some columns.

View 1 Replies View Related

Date Search By Last Week / Month?

Nov 2, 2011

I have a create a report for our dept with certain criteria. So far what I need is a report that shows last weeks numbers or sign ups. I can't get the date search or between to work.

What I need is one for month end and one for last 7 days.

here's what I have so far.

select ap.name

to_char(ap.opendate,'MM-DD-YY') "Open Date"

from [databasname]

where ap.opendate between databasename-7 and databasename-1

I really don't want to change the date myself I want the system to know when the 7 days or month is.

View 4 Replies View Related

SQL & PL/SQL :: Date Format With Zero Excluded From Month

Sep 20, 2010

i have a requirement where i have to exclude the zero from the month e.g jun=06 but i require 6 only not zerodec=12 i require 12

Do we have any format in oracle which support this.

View 3 Replies View Related

SQL & PL/SQL :: ORA-01839 - Date Not Valid For Month Specified?

Nov 1, 2013

our web application has a field DATETO which has no validation (end date). So user can put garbage there. In this field should be SYSDATE + max. 2 years. But also SYSDATE + 1 month OK.

I need to make a script that sets for example "31.12.9999" to null. Because so long end date is non sense.

SQL> SELECT EXTRACT (YEAR FROM (TO_DATE (DATETO, 'DD.MM.YYYY')))
FROM XXX_USER_JC_ORDERID
WHERE DATETO IS NOT NULL;
ERROR:
ORA-01839: date not valid for month specified

no rows selected

Littlefoot writes about ORA-01839 "It usually happens when invalid dates are used, such as 30th of February"[URL]..

I don't see invalid date???

SQL> SELECT DATETO
FROM XXX_USER_JC_ORDERID
WHERE DATETO IS NOT NULL;
DATETO
--------------------------------------------------------------------------------
23.09.2013

[code]...

DATETO
--------------------------------------------------------------------------------
31.12.2014
31.12.2016
31.12.2013
31.08.2014

[code]...

View 7 Replies View Related

PL/SQL :: Calculate Financial Month From Date

Mar 28, 2013

I need a pl/sql function to calculate the financial month from an date... For eg. If i enter input date as '21-sep-2012' the function should return me the output value in months as 6. so it should calculate from april to september of that year...

View 13 Replies View Related

Get Month Number From Date Format

Oct 31, 2012

I am trying to get the month number from this date format '19-OCT-12' . when i try to run the below statement i am getting an error like "not a valid month"

select to_date('19-OCT-12','MM') from dual

i need to get value as 10

View 4 Replies View Related

Split Date Column Into 4 Month Periods

Feb 11, 2011

I have a table having a code column A and a date column D1 which represents the days when the code was inserted. I can have more then 1 date for a code.

The idea is to create another column (an id) which will correspond to all the inserted days of a code for a period of 4 month. if, after 4 month of the first insert, another records appears, then another id will be generated for my code. If a code has the date included in one of the intervals existing already, then it will just receive the corresponding id.

Example:
id code date
id1 cd1 01/01/2010
id1 cd1 04/03/2010
id1 cd1 22/04/2010
id2 cd1 27/05/2010
id2 cd1 21/06/2010

If a cd1 appears now on 22/05/2010, then i have to give it id2.

View 3 Replies View Related







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