PL/SQL :: Prevent Overlapping Date
Nov 16, 2013
I use Oracle 11.2.0.3.I have APPOINTMENT table:(ID NUMBER PK , FROM_TIME TIMESTAMP , TILL_TIME TIMESTAMP , NOTE VARCHAR2 (200))I want to prevent end users from making an appointment that overlaps with other appointments. I created this trigger:
Create or replace TRIGGER "APPOINTMENT_CK"
BEFORE
INSERT OR UPDATE ON APPOINTMENT FOR EACH ROW
BEGIN
IF
[code]....
But, it looks like I cannot use column name here.
View 11 Replies
ADVERTISEMENT
Jun 28, 2012
CREATE TABLE CONTRACT
(
EQT VARCHAR2(10 BYTE),
SUBTYP VARCHAR2(3 BYTE),
FROM_DT DATE,
TO_DT DATE
);
[Code]....
The data in contract and lease table show like below.
contract
EQT SUBTYPFROM TO
ABCD100000DRY1/1/20121/7/2012
ABCD100000DCH1/7/20121/21/2012
ABCD100000GAZ1/21/2012
lease
EQT CONTRACTFROM TO
ABCD100000LS11/2/20121/10/2012
ABCD100000LS21/10/20121/17/2012
ABCD100000LS31/17/2012
Now required output should be
EQT SUBTYP CONTRACTFROM TO
ABCD100000DRY 1/1/20121/2/2012
ABCD100000DRYLS11/2/20121/7/2012
ABCD100000DCHLS11/7/20121/10/2012
ABCD100000DCHLS21/10/20121/17/2012
ABCD100000DCHLS31/17/20121/21/2012
ABCD100000GAZLS31/21/2012
The period for contracts should be in sequential order and should not overlap and if contract does not exist for that date period, then it should return NULL.
View 9 Replies
View Related
Mar 30, 2013
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 Related
Sep 2, 2011
I have installed Oracle Database 11g.2 by database configuration assistant on windows XP as and adminstrator on my laptop(no connection to network),but when I want to create database I face this warning: error securing database control ,Datatbase control has been brought up in non-secure mode . to secure the database conntrol execute following command....(error is attached).
View 7 Replies
View Related
Oct 10, 2011
we have a table attendance_d with no constraint which have duplicate emp_id we want to stop duplicate emp_id on the same date. if employee's record already entered in today's date then duplicate Error message must show if he tries again to enter the same record. for this i have written the following code but it is not working date wise some body. i want to use on WHEN VALIDATE ITEM TRIGGER in oracle forms 6i.
DECLARE
l_count NUMBER;
BEGIN
[Code]....
i have tried my best to format the syntax of code but in preview it showing like as above i have formated in toad by using the key ctrl+shift+f.
View 2 Replies
View Related
Aug 15, 2012
I have a table with 4 records with start_date and end_date fields
start_date end_date
1/1/2003 1/4/2005
1/1/2004 5/3/2006
1/1/2007 1/4/2008
1/1/2008 6/3/2009
as you see records 1,2 and records 3,4 have overlapping dates. I need to combine them to get continuous intervals. The result should be:
start_date end_date
1/1/2003 5/3/2006
1/1/2007 6/3/2009
Is it possible to do by SQL query?
View 10 Replies
View Related
Jun 7, 2012
i want to find the data which has the more then one rates available for the given date. Here below i've posted a test table. how can find the products for which, there multiple dates/overlapping period is available through sql statement.
SQL> CREATE TABLE STO.TEMP
2 (
3 ID NUMBER(8),
4 ITEM_ID NUMBER(8),
5 RATE NUMBER(5,2),
6 FROMDATE DATE,
7 TODATE DATE
8 );
[code]....
View 8 Replies
View Related
Oct 11, 2012
whether the overlapping Multiple series charts are possible in Oracle APEX or not .
I am trying to create two graphs for two data sets , one as marker and another as line , but its giving me issues such as
1) X axis is taking all the points of the first series suppose(
1,5,10,180) itsplotting these first . and its then starting labeling
the x-axis for another one which has values like
(20,50,100,1000,15000)
so my X-axis is now ---> 1,5,10,180, 20,50,100,10000,150000
In case i make my marker chart series as the 2nd sequence , then its drawing all the markers on the right side of the chart .
[URL].........
Workspace:- NR_WORKSPACE
Username:-user1
password:- H123$
whether this thing is achievable in oracle apex or not , is there any work around ?
View 0 Replies
View Related
Mar 8, 2010
I want to avoid duplication on old_nic_no and new_nic_no number in a Table, for this i am using a following trigger
create or replace TRIGGER chk_ip_duplications
BEFORE UPDATE
ON cb_insured_person_bak
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
[Code]...
when i use following command
update cb_insured_person_bak set new_nic_no = '34601-0774284-9' where eobi_no = '4300G043746'
34601-0774284-9 already exist with another eobi_no , i expect error described in rise_application_error clause but i give following error
ORA-04091: Table cb_insured_person_bak is mutating..........
How i can resolve this problem.....
View 15 Replies
View Related
May 6, 2010
Form has insert and delete enabled.
I would like to prevent the deletion of a record based on some column value.
Something like:
IF (COLA value < 10) THEN
SHOW ALERT;
RECORD IS NOT DELETE
ELSE
DELETE RECORD AS NORMAL
END IF;
I want this to happen even before the record is marked for deletion, but I don't know where to put it. I tried a pre-delete trigger, but it does not work they way I want.
View 8 Replies
View Related
Jan 31, 2011
how can i prevent an item from being copying. I mean to say user will not able to copy the value from the item and paste in notepad.
The item will be enabled also i can not desable it.
View 9 Replies
View Related
May 10, 2013
Im trying to create a trigger to prevent transactions like insert, update and delete based on two conditions:
1) Friday
2) Between 5pm to 8am
View 5 Replies
View Related
Jun 26, 2013
here' my code.
delimiter //
SELECT CONNECTION_ID()//
LOCK TABLES source.jos_daikin_control_card_fcu_model WRITE//
[Code].....
ERROR 1192 (HY000): Can't execute the given command because you have active lock
ed tables or an active transaction
Is there a way to prevent other session from accessing the tables called in the procedure?
View 3 Replies
View Related
Sep 9, 2010
i've created a schema, which contains 30 tables. the tables are accessed & updated through a web based application. i've made public synonym for all tables for some reasons. how can prevent any one other than application users from updating the tables from Sqlplus.
View 2 Replies
View Related
Sep 17, 2012
Im my application, after login, I have a hidden & protected item whose value I am setting based on a logic. Also I would like to access this item's value in a application process, so session will have this value. Now I do not want anybody to be able to change the value of this item. For Eg, if my item was P1_RESP, I was able to change its value in the following way, I have an edit link on somr IR, where I redirect to another page passing some values and the URL looks like : [URL] After the browser loads, I can edit the above URL to below and click enter, [URL]
View 1 Replies
View Related
Mar 4, 2013
We would like to create functions to insert and update our tables and would like to make it not possible to update and insert the table directly outside of the function. Is there a way to do that in the trigger?
View 1 Replies
View Related
Jun 19, 2011
How can prevent DBA user from disabling any trigger ? suppose DBA user can't be able to execute following command
ALTER TRIGGER {trigger_name} DISABLE;
how can i protect it?
View 3 Replies
View Related
Jan 22, 2010
we are using oracle10g version. Currently my character set is WE8MSWIN1252 At present, somehow, we have non-english characters(for example spanish) in the database. We wanted to stop entering these kind of characters.. Can we prevent this by changing the current character set?
View 2 Replies
View Related
Dec 8, 2010
how to know when a user was navigating away from the current open form (and I wanted to prevent the navigation with a dialog box) because they had entered a new URL in the address bar and were trying to navigate to it? I've seen a reference to it from an ADF perspective -> [URL]
but was wondering how to do it within Forms?
The reason for this is that i would want to prompt the user to confirm that they wanted to exit the form as potentially they would have a record (in the form) flagged as being updated and as such no other user (including themselves) could susbequently access it. So, I'm basically wanting to know if there is a way to catch the fact that the user is about to navigate to another web page.
Is it by using javascript and if so, how would it be implemented?
View 1 Replies
View Related
Nov 11, 2012
Normally if node fails, VIP & resources are transferred to another node (clients need to failover).
if node is back again CRS detect this, make it as 'family member' and try transfer VIP & resources back to this node (clients will force to failover again).
this failover (despite of failover method I use) make each uncommitted transaction to be rolled back. client need to be disconnected from the service and VIP through they are connected to this service and they need reconnect to the new node - during this stage all DMLs modifications are gone, and need to be re execute.
View 11 Replies
View Related
May 31, 2013
Is there a way to prevent Apex from combining labels into an "other" category in the charts?
View 4 Replies
View Related
May 4, 2013
I'm using Apex 4.2.1 against Oracle 11gR2 and mod_plsql.I've created a page containing two classical reports and an editable tabular form, with the form needing to be positioned at the page bottom.
The tabular form contains the usual buttons Apex creates by default such as "Add Row", "Save", and "Delete". Whenever users click any of these buttons, the entire page "jumps" and the mouse cursor goes to the very top of the page. Very disconcerting as well as frustrating since users must constantly scroll down to where the form is to see if a row was added or deleted.
I have set the tabular form region to "Partial Page Refresh". No effect.I have also created a dynamic action triggered on a button click (say the "Add Row" button) and whose action is to refresh the specific tabular form region. Again, no effect.
Even with both of these interventions, implemented individually as well as in combination, still has my page jumping and the mouse cursor at the top of the page whenever users click any of these form buttons.
how to prevent such screen "jumping"?
View 6 Replies
View Related
Aug 20, 2010
I do not want the "PL/SQL procedure successfully completed." message in my output file - I don't see/recognise an option to suppress or remove this.
-- Test Proc
--
set linesize 500
set pagesize 50000
set tab off
set wrap off
set serveroutput on
set feedback on
[code]...
PL/SQL procedure successfully completed.
View 2 Replies
View Related
Jul 19, 2013
I have created a IR report and I set the default search column using the suggestion found in the thread URL....but how can I keep this default even after the research was done?Now it is resetted !
View 1 Replies
View Related
Jun 1, 2010
I'm trying to work out how to take a table like this:
IDDate
12502-Feb-07
12516-Mar-07
12523-May-07
12524-May-07
12525-May-07
33302-Jan-09
33303-Jan-09
33304-Jan-09
33317-Mar-09
And display the data like this:
IDPeriodPeriod StartPeriod End
125102-Feb-0702-Feb-07
125216-Mar-0716-Mar-07
125323-May-0725-May-07
333102-Jan-0904-Jan-09
333217-Mar-0917-Mar-09
As you can see, it's split the entries into date ranges. If there is a 'lone' date, the 'period start' and the 'period end' are the same date.
View 13 Replies
View Related
Apr 12, 2010
I have a two date fields in my form; valid from date and expiry date.
Currently my valid from date has an inital value property of $$date$$ which automaitcally brings up todays date.
I need my expiry date to automatically show a date 15 years after this date?
View 8 Replies
View Related
Oct 1, 2012
I am on APEX 4.1.1, db 11g and I have a report which is quite slow to retrieve results from its query. The page has some filter fields (e.g. store code, dept code) in addition to the generic search field.
When the user lands on this page (from a menu page), the query runs before the page displays and this typically takes 1-2 mins without any filters yet set. The usual browser loading indicators are not obvious to the user and they might not be aware that it is working on the request.
I want it so that it will only run the query AFTER allowing the user to get to the page, let the user fill in some filter criteria and then click on the GO button. Therefore the query will run after the page is submitted. When you hit the GO button on the interactive report, a nice rotating apex_loader.gif appears, making it obvious to the user that it is working on the request.
I would prefer NOT to create 2 pages, one for user filter, and a second for the actual report as I have many reports/inquiries which fit this category and I would prefer NOT to have to create pairs of pages for each.
View 5 Replies
View Related
Jun 12, 2012
I have an application that I'd like to prevent activity in after a certain time of day, say 3pm. Is there any way I can force logout of all current users and then prevent re-login until 9am the next day (short of deleting all of their login credentials and then recreating them the next morning)?
View 7 Replies
View Related
Jul 8, 2013
I have set up a label which interacts with our LIMS system. I have set up variables on this label which pull in attribute values from the available tokens. When the attribute value is null, the label is automatically inserting 'N/V' onto the label.
I would prefer for the variable to appear as a blank field on the label when the attribute value is null in the LIMS. can't find anything in the user's manual. Perhaps there is some setting where you can define what to display for null values. I can't seem to find any information on this.
View 1 Replies
View Related
Dec 3, 2012
Version : 4.1.1, I have a tabular form on a DB table. One of the columns is a date field. When the user hits the "add Row" button on the tabular form, I want the Date field to be defaulted to sysdate. Here is what I have tried so far,
1. Created a "hidden" item P1_SYSDATE and populated the default value with sysdate. After this, under the DB tabular report date field, I used default type - Item/application on this page and entered P1_sYSDATE
2. Instead of populating the default value of the P1_SYSDATE hidden item, I created a before regions process and added
:P1_SYSDATE := sysdate
and added P1_SYSDATE to default type of the tabular date field with default type as "ITem/application on this page.
I get the error
ORA-01790: expression must have same datatype as corresponding expression
I tried to_Char(sysdate,'dd-mon-yyyy') and then converting it back to to_date. still no luck.
View 1 Replies
View Related