Help in adding the validation

Hi All,
I have two tables table A and table B.Table A has equipment,shift,from date ,to date and quantity columns and table B has equipment,shift,from date and to date columns. Data in table b is like e1,s1, 1/24/2010 10:00:00,1/24/2010 12:00:00;
e1,s1, 1/24/2010 13:00:00,1/24/2010 14:00:00;
e1,c1, null,null;
temporary table for Table A has the data as
e1,s1, 1/24/2010 10:00:00,1/24/2010 10:30:00;
e1,s1, 1/24/2010 10:30:00,1/24/2010 12:00:00;
e1,c1,1/24/2010 12:00:00,1/24/2010 13:00:00;
The data from temporary table should move to table A only when if the user uses the shift c1 for the time for which there is no row defined in table B means if the user enters in temporray table e1,c1, 1/24/2010 10:00:00,1/24/2010 10:30:00;
then it should not move to table A because he has used the c1 for the time which was defined for shift s1. means if temp. table is using the shift c1 then for the time for which its using there shouldn't be any row in table b except teh row with from date and to date as null.Can someone please tell me how to add this validation.
Thanks in advance.

Hi Oleg,
Thanks again for your response.But I didn't understood the query...I wanted the validation for e1,c1,from time,to time row in temp table of table A for this the row present in the table A would be e1,c1,null(from time),null(to time).actually my requirement is to match the shift time (from time and to time of temp table A) for a given shift and equipment with from time and to time of table B. If form time and to time are not null then I have written the condition:
temp_tablea.equipment_id=tableb.equipment_id
and
temp_tablea.shift_id=tableb.shift_id
and
temp_tablea.from_time>=tableb.from_time
and temp_tablea.from_time<=tableb.to_time
and
temp_tablea.to_time>=tableb.from_time
and temp_tablea.to_time<=tableb.to_time
This will work if from time and to time of table B are not null .But if its null it won't work. suppose shift doesn't exist for a particular period say 13:00:00PM -14:00:00PM then data in table b is in the format
e1,s1,12:00:00 AM,13:00:00 PM
e1,s2,14:00:00PM,12:00:00 AM
e1,c1,null,null(this is basically for all the days we have this kind of row so that if the shifts are not continous we have row which has from time and to time as blank).
Now suppose the data comes for 13:00:00-14:00:00 in temp table of table A then the row would be e1,s1, 13:00:00,14:00:00 so basically i want to add that validation which will check whether the time given for this row comes in any of the sHifts dfined in that table ex. e1,c1,12:00:00PM,14:00:00 PM is given in temp table A then thsi row should go to error because 12PM -13 PM is there with a valid shift, only if e1,c1 has the time 13 pm -14pm whcih is not defined for any shift in table B then it will go to fact.
Thanks in Advance.
Regards,
Amrit

Similar Messages

  • Need help with adding the following to a program

    Modify the mortgage program to display the mortgage payment amount. Then, list the loan balance and interest paid for each payment over the term of the loan. The list would scroll off the screen, but use loops to display a partial list, hesitate, and then display more of the list. Do not use a graphical user interface. Insert comments in the program to document the program.
    Currently I am working on adding the following line in bold but getting error expected ";" on line 27
    import java.io.*;
    import java.util.Date;
    import java.text.DecimalFormat;
    public class Mortgage5
    public static void main(String[] args)
    Date currentDate = new Date(); //Date constructor
    DecimalFormat decimalPlaces = new DecimalFormat("$###,###.##");
    //declaring variables
    final double PRINCIPLE = 200000;
    final double INTEREST = .0575/12;
    final double TERM = 12*30;
    //declaring variables
    final double MONTHLY =PRINCIPLE*(INTEREST/(1-Math.pow(1+INTEREST, -TERM)));
    //displaying variables
    System.out.println("\t\t" + currentDate);
    System.out.println("\t\tPrinciple or Loan Amount: " + decimalPlaces.format(PRINCIPLE));
    System.out.println("\t\tInterest Rate: " + (INTEREST));
    System.out.println("\t\tThe Term of Loan (in months): " + (TERM));
    System.out.println("\t\tThe Monthly Payment is: " + decimalPlaces.format(MONTHLY));
    System.out.println("\t\tThe Balence - Your Payment is: " + decimalPlaces.format(PRINCIPLE*INTEREST*TERM)-MONTHLY));
    Any suggestions??? PLEASE

    Ok I figured out the issue now if someone can help me. I need to create a loop for the following:
    The list would scroll off the screen, but use loops to display a partial list, hesitate, and then display more of the list.
    Here is the Program so far.
    import java.io.*;
    import java.util.Date;
    import java.text.DecimalFormat;
    public class Mortgage5
    public static void main(String[] args)
    Date currentDate = new Date(); //Date constructor
    DecimalFormat decimalPlaces = new DecimalFormat("$###,###.##");
    //declaring variables
    final double PRINCIPLE = 200000;
    final double INTEREST = .0575/12;
    final double TERM = 12*30;
    //declaring variables
    final double MONTHLY =PRINCIPLE*(INTEREST/(1-Math.pow(1+INTEREST, -TERM)));
    final double NEWBAL = (PRINCIPLE*INTEREST*TERM) -MONTHLY;
    //displaying variables
    System.out.println("\t\t" + currentDate);
    System.out.println("\t\tPrinciple or Loan Amount: " + decimalPlaces.format(PRINCIPLE));
    System.out.println("\t\tInterest Rate: " + (INTEREST));
    System.out.println("\t\tThe Term of Loan (in months): " + (TERM));
    System.out.println("\t\tThe Monthly Payment is: " + decimalPlaces.format(MONTHLY));
    System.out.println("\t\tThe Balence - Your Payment is: " + decimalPlaces.format(NEWBAL));
    }

  • Newbie Needs Help on adding popup/validation screen

    I have to create a procedure in a PDF that will ask the reader if they agree to follow the procedure when they try to close the PDF
    Sort of like a popup or validation screen when you load new software.
    So the screen would have a statement i.e., Do you agree to follow this procedure? then the reader would have to press a yes or no button which would be on the same screen as the statement and their answer would then be automatically e-mailed back to the originator.
    Can this be done in LivecycleES2?
    If yes, can you point me in the right direction. I have Padovas PDF Form Bible.
    I have done some javascript along with some PDF forms with radio buttons and e-mail Links
    The boss saw this popup screen at another company so he figures it can be done.

    Your email?
    I have done a sample for you.
    my email: [email protected]
    Nith

  • Adding the PSWApproval Content Type to the Outcome Options in SharePoint 2013 Designer

    Hi All,
    I would like to add the "PSWApproval Task" Content Type in the sharepoint 2013designer, in the process of creating a project server 2013 workflow.
    By default the Share point Designer is taking the Task content Type as Workflow Task. Can some one help me adding the PSWApproval Task here. Attached is the snapshot of the same.
    Thanks

    Its funny I am researching tis very topic right now. I have a SP2010 environment I will be migrating to 2013. My content types were used in multiple site collections without creating or using a content type hub. So, I am looking for information to create
    a strategy to get them into one.
    I have in excess of 400 Custom content types.   Also - Has anyone developed/documented a process for being able to rebuild/migrate data between content types.   Part of what we are looking to do prior to implementing a new records management
    project
    James Moore

  • I have 2 email addresses set up on my iphone 5, 1 can send mail and the other can't... have tried deleting and adding the account, no luck, have tried all suggestions... anyone help?

    I have recently purchased the iphone 5S and have two AOL email accounts set up on it. They could both receive and send mail on the first day, but from the second day only 1 can send mail (both still receive). I get an message saying "Unable to send mail. A copy has been placed in your Outbox. Sending the message content to the server failed." This has been the response now for 3 days and suddenly this morning, I was able to send an email from this account, but only the one and now it's back to that same message. I have deleted and added the account again, using various methods. I even reset my phone and set it all up again from beginning with no luck. It is very frustrating and I am unsure why I can't send from both accounts, especially being that they are the same provider. I have read forums and it appears many have this same problem and I wondered if anyone has had it recently on this phone and how they fixed it. Someone said just use the AOL app to send from this account, yes that can be done, but it's inconvenient having to sign in all the time when i have a mail app that should work automatically. Any suggestions would be welcomed!!

    I am not sure if this issue is going to help you but lets give it a try.
    I know that where im from, which is the Netherlands, I am not able to sent e-mails from my iPhone or any other mobile device by using 3G or a random WIFI acces point. The provider only allowes you to sent e-mails when you are connected to a network of there own. Which means if you have provider "101" and your email settings are set up for this provider in your iPhone but your using the network of a friend of yours which is provider "202" you cannot sent emails from his network. Though you can receive them you may not sent.
    As I said, I am not aware if this issue is the same for you totaly depents on the country and provider your using.

  • Need help in understanding the error ORA-01843: not a valid month - ECX_ACT

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

  • I can no longer receive or send email via my Yahoo account  from my iphone6.  I've downloaded several "help guides" from the internet and tried them, including deleting the Yahoo account and re-adding it via imap.  But nothing seems to work.  Any ideas?

    I can no longer receive or send email via my Yahoo account from my iphone6.  I've downloaded several "help guides" from the internet, deleted and re-added the account via imap settings.  Nothing seems to work.  Any ideas?

    Use the yahoo app if available?

  • Please help me with the problem of validator in struts

    sorry for my poor English
    i have a question which i can't deal with.
    i have a jsp page in which some client imformation can be modified.
    The modify page accepts the parameters from the previous page in the form of href="/xxx/xxx.jsp?xxx=mobilephone ".i use the struts tag <html:text property="mobilephone " value="mobilephone "><html:errors>to display and modify the information.
    but i found the Validator Frame didn't work instead of some information in the console :
    117: </tr>
    118: <tr>
    119: <td bordercolor="#000000" bgcolor="#ECE9D8">mobilephone</td>
    120: <td><html:text property="mobilePhone"
    121: value="<%=new String(request.getParameter("mobilePhone").getBytes("ISO8859_1"),"gb2312")%>" /></td>
    122: <td width="152">
    123: <div style="background-color: #FFFF40;text-align:center;"><html:errors
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    and i found the page can't be debugged before it pass the validate.
    so i think some mistake must occur in the validator frame .
    please help me.
    thank you.

    Jurgen,
    Are you just getting this error while attempting to verify? Can you successfully deploy the app? This issue looks familiar to an earlier post in this forum and I believe the archive is OK but is anerroneous verify error? If the cmp-resource is defined in sun-ejb-jar.xml then it should be fine and if the resources are correctly configured. The other thing to check is that you have a persistance manager resource defined in domain.xml; i.e.,
    <persistence-manager-factory-resource enabled="true" factory-class="com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl" jdbc-resource-jndi-name="jdbc/ejbTutorialDB" jndi-name="jdo/pmf" object-type="user"/>

  • Please help me with the digital signature validation problem?

    Please help me with the digital signature validation problem?

    Hi
    Execute the program in the Debuggin mode.
    In the Debugger Window
    Select Breakpoint -> Break point at -> Breakpoint at source code Menu Item and enter the details of the program/include/line no..
    Activate the System Debugger On from the Settings Menu.
    Hope this would help you.
    Murthy
    Edited by: Kalyanam Seetha Rama Murthy on Jul 18, 2008 7:20 AM

  • HT204053 S iPad with a @me address. I am trying to sync the two by adding the @ me address to the itouch without any success? Please can someone help me. Thanks

    I originally set up my itouch with a gmail account and now i have an ipad set up with a @me account. Can someone help me to sync the two by adding the @ me address to the itouch as i am not having success? Please can someone help me. Thanks

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")

  • I run 3 email accounts on Mac Mail, all 3 disappeared after doing the latest OS X update. I have tried adding the accounts back but no mail appears. Help!

    I run 3 email accounts on Mac Mail, all 3 disappeared after doing the latest OS X update. I have tried adding the accounts back but no mail appears. Help!

    The mailbox list is divided into categories with headings in caps, such as ON MY MAC. When you hover the cursor over one of those headings (except for MAILBOXES), you should see the word Show or Hide on the right. Click Show. The  MAILBOXES category can't be hidden.
    In each category, the mailboxes are arranged in groups, such as Inbox. To the left of each group is a small disclosure triangle. If the triangle points to the right, click it so that it points down.

  • HT5622 I lost all my pictures! Please help:( I added all my photo to a new album from the camera roll and i delete the picture that already move to new album, at last all my picture was gone !:'( Please, anyway to recover back all my photo? please help :'

    I lost all my pictures! Please help:( I added all my photo to a new album from the camera roll and i delete the picture that already move to new album, at last all my picture was gone !:'( Please, anyway to recover back all my photo? please help :'( Apple Service Center or Branch can help?

    Albums is a way or sorting photos. Photos aren't moved from the Camera roll. The Camera Roll consists of all the photos on the phone. If you delete from Camera Roll they are deleted everywhere but Photo Stream.
    Are you using Photo Stream? Your photos, providing they wer recent should still be in Photo Stream. If you have Photo Stream set up on your computer they should all be there.

  • Need help with adding emoji to my hubby's phone don't see it when I click on the keyboard tab

    I need help with adding emoji to my hubby's iPhone when I go to settings then the keyboard tab it's not there

    I did that bad it's not there and doesn't give me to option to click on it

  • Adding the unique validation on child vo attribute

    Hi, I'm using Jdev 11.1.2.0 I have two tables, master child relationship. In master EO1, I have column Master_Id and in child EO2, I have columns Master_Id, child_id, child_name. i have created the assosiations in beteween EO1 and EO2 with the column Master_Id. and creatd vo's and viewlinks also. and when i drag and drop the master vo and child vo on to the page, if i select master vo first row, the correspodning child records are displayed perfectly. Now I want to apply the unique validation on the child vo columns  child_id and child_name. like Child vo data;
    Master_Id 
    Child_Id 
    Child_name
    1
    1
    A
    1
    2
    B
    1
    3
    C
    2
    1
    A
    2
    2
    B
    2
    3
    C
    if I select 1 in master table, then in child table if i create a row and inserting the data, it should check for the duplicate data is there or not under that master_id. I did adding the Custom attribute validation on EO level, like checking the value is existed in the given rowset or not. Instead of adding this custom attibute validation, is there any other way to do it on the EO attribtue level, like  selecting the generate unique key constraint. Any suggestion would be appreciated. Thanks.

    In this car you only can validate using have methods or groovy.  Read http://docs.oracle.com/middleware/1212/adf/ADFFD/bcrules.htm#CIHBBDDB for more info about this.
    However, if you have the relationship you should have the pk fk too.
    Timo

  • Do deleted entities get added to the validation listener?

    Hi all,
    I was reading about the 3 listeners in Jobinesh's [blog post|http://jobinesh.blogspot.com/2011/09/what-you-may-need-to-know-about.html] and got a doubt.
    i. Do deleted entities get added to the validation listener? Does not make sense to me as there would be no validations to trigger on deleted entities.
    ii. Is there some way to remove entities from Validation Listener? I see that there are method to remove the entities from other two listeners.
    Thanks,
    Srini

    Hi Frank,
    Was testing this and was surprised to find that validation listeners were not affected when I deleted entities. Maybe I missed something.
    If they get added, is there some way of removing the entity from the validation listener?
    Thanks,
    Srini

Maybe you are looking for

  • Help! Battery with red slash appears when I plug in charger!

    This past weekend I woke up to find my blackberry unresponsive with a battery icon with a slash through it. I fiddled with it and took out hte battery a couple of times and it came on normally. Monday I plugged it in to charge and same thing. Tonight

  • Paragraph

    Hi, I made a script for add a continued at end of paragraph but unfunction, call you please help to fix it? var myDialog = app.dialogs.add({name:"add continueds",canCancel:true}); with(myDialog){     with(dialogColumns.add()){         with(dialogRows

  • Use of SQL Tuning pack  in SAP

    We have activated the Oracle 'SQL Tuning pack'  however only one function "SQL Tuning Advisor" is activated/visible in ST04 and other functionality is not visible. We have already taken license of 'SQL Tuning pack' . Other then this we want to use fo

  • SAP Microsoft Management Console  Windows MMC no open

    Hello guys, I have a problem with the MMC is not working and does not open. I do not get how to stop the instance of SAP. When I open the MMC is running the process and never opens it. I am also trying to stop the instance with the following command

  • Problems downloading Adobe Reader 9.2 (getPlus+(R): Error)

    I tried downloading acrobat reader 9.2 onto my laptop (Windows XP OS) and was met with an error message saying: Installation is corrupt! (16249.202.235 - 42172312.80040154.FFFFFFFF.80040154). Can anyone tell me how to fix the problem?