Search weekend Dates through query

I'm setting up a report in the APEX to show all the JEs which have been posted on the weekends. I can query all GL records and adjust the date, but I have no odea how to identify the dates that fall on Saturday or Sunday and. We run EBS 11i. I can send the basic query if that helps.


Any help would be appreciated.

Assuming that 'weekend' always means Saturday and Sunday and that your sessions always use English NLS settings,

SELECT *
  FROM your_gl_table
 WHERE TO_CHAR( journal_entry_date, 'fmDAY' ) IN ('SATURDAY', 'SUNDAY' );

or

SELECT *
  FROM your_gl_table
 WHERE TO_CHAR( journal_entry_date, 'D' ) IN ('1' '7' );

Justin

Tags: Database

Similar Questions

  • OIM 11 g - adjustment process form data through query API

    Hello

    I would define the shape of process via the API data request. I have a user configured in AD. Now I would like to define form data to process (title) through the API request. I have imported the necessary data and that it works through UI request. But when I try to do this through query API, the value is not updated in the form of process. Can anyone help with a code example to achieve this functionality? Thank you.

    You define the data of application correctly when creating on-demand via the API? There is also the correct attribute in all reference maps data? What about the attribute itself? It is in the form of parent or child?
    Looking at the title of the ad must be the parent form data, so use the following code as an example to update all data correctly:

    
               long resKey = 0L;
               String str = null;
               String resourceKey = null;
               Map searchMap = new HashMap();
               tcResultSet resultSet = null;
               RequestData requestData = null;
               Beneficiary beneficiary = null;
               RequestBeneficiaryEntity entity = null;
               List beneficiaryList = null;
               List entityList = null;
               List entityAttrList = null; 
    
               searchMap.put(RESOURCE_ATTR_NAME, RESOURCE);
               resultSet = _resourceService.findObjects(searchMap);
               resKey = resultSet.getLongValue(RESOURCE_ATTR_KEY);
               resourceKey = Long.toString(resKey);           
    
               RequestBeneficiaryEntityAttribute parantAttr = new RequestBeneficiaryEntityAttribute();
               parantAttr.setType(TYPE.String);
               parantAttr.setName("Title");
               parantAttr.setValue("Mr.");
    
               entityAttrList = new ArrayList();
               entityAttrList.add(parantAttr);
    
               entity = new RequestBeneficiaryEntity();
               entity.setEntityKey(resourceKey);
               entity.setEntityType(RequestConstants.RESOURCE);
               entity.setEntitySubType(RESOURCE);
               entity.setEntityData(entityAttrList);
    
                  entityList = new ArrayList();
               entityList.add(entity);
    
               beneficiary = new Beneficiary();
               beneficiary.setBeneficiaryType(Beneficiary.USER_BENEFICIARY);
               beneficiary.setBeneficiaryKey(USER_KEY);
               beneficiary.setTargetEntities(entityList);          
    
               requestData = new RequestData();
               requestData.setRequestTemplateName(TEMPLATE);
               requestData.setJustification("Test");
               requestData.setBeneficiaries(beneficiaryList);
    
               RequestService reqsrvc = client.getService(RequestService.class);           
    
               str = reqsrvc.submitRequest(requestData);
    
               System.out.println("Value from submitRequest : '" + (str != null ? str : null) + "'");
    

    Just a dummy code, but it's the overall structure. Once you have submitted the request and commissioning successful, you should see the data in the form of process.

    HTH,
    BB

    Edited to add the return code by: bbagaria on Sep 5, 2011 10:18

  • Search page based on query with Table on Layershift ADF Panel does not work correctly

    Hello

    I'm on 11.1.2.4 jdev and deployed my application on glassfish 3.1.2. I've hosted this application on Layershift externally.

    I created a search page based on query ADF with table Panel. All fields of research are working fine on weblogic Server integrated and my deployment local glassfish.

    However, on Layershift, when I enter some criteria of research in certain fields, it does not record.

    UPDATE, it seems that the problem is with the fields which are of the "String" ie. Name. Fields of data type Integer and Date seems fine.

    any ideas please?

    Thank you

    kdario, you're right, ViewCriteria does not use the correct syntax for mysql for the concatenation.

    The generated sql statement looks like this.

    SELECT * FROM (select student_id, student_name, from  student) QRSLT WHERE ( ( (UPPER(student_name) LIKE UPPER('%' || 'Per' || '%') ) ) )
    

    as DB MySql does not support | (double pipe sign), its sql causing failure.

    in order to support |, mysql requires to change the sql mode setting in the file my.cnf (on linux) in the

    # Set the SQL mode to strict
    sql-mode="PIPES_AS_CONCAT,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
    

    After setting this parameter, its working fine now.

  • Search between Dates

    It's confusing, so I'll do my best to explain.

    We have an application where employees sign out of the office. They provide it userID, LeaveDate and ReturnDate and it is written in a single record in SQL.

    There are also several searches for this data, which is to enter a user name and two dates and return if this user is disconnected between these two dates if the LeaveDate is now between the two search dates.

    The problem is that if someone was taken out of the 8 to 15, and a search was made on them for the 11th to the 13th, he would not return anything that either since the (8th) LeaveDate do not fall between the two search dates.

    So now, I am loaded with a way to solve this problem. Is there a search between dates and determine whether any date within this range is in the range of dates that the employee is disconnected? Is it possible, when the employee signs, create a record for each date in the span of days they have disappeared? So if someone out of the 10th to the 12th, it would create three different entries.

    Any help is appreciated.

    > return if this user is disconnected between these two
    > dates if the LeaveDate is between the
    > search two dates

    Start by creating some examples of date that will cover all the possibilities. As

    If the dates of research are:

    Search Start = 11
    End of search = 13

    You want to include these cases

    1 Date1 is before you start to search for... AND. Date2 is between start and end search
    Example: 6 to 13

    2 Date1 is between start and end search... AND... Date2 is after end search
    Example: 9th and 17th

    3 Date1 is between start and end search... AND... Date2 is between start and end search
    Example: 7-12

    4 Date1 is before you start to search for... AND... Date2 is the result of research
    Example: 5-21

    Then translate these terms to sql and test with some sample values. If your fields contain dates that comparisons are simple. If they contain a date and time don't forget to report both in your comparisons.

    There are better ways to write this, but here's an example of how you might begin to translate the above 4 conditions. Once you have the job of the initial query, you can improve the sql.

    Pseudo-CF/SQL

    WHERE (Date1< #start#="" and="" date2="" between="" #start#="" and="" #end#="">
    OR (Date1 BETWEEN #Start # AND #End # AND Date2 > #End #)
    OR (Date1 BETWEEN #Start # AND #End # AND Date2 BETWEEN #Start # AND #End #)
    OR (Date1 < #start#="" and="" date2=""> #End #)

  • Upgrade to a recent version of Thunderbird, I can't filter my search by date more.

    Upgrade to a recent version of Thunderbird, I can't filter my search by date more. The date format lost slashes (' 31/12/2014'-> '31122014') and date filtering doesn't work anymore, the filter seems to be non-existent.
    I right click on the Inbox folder and the search window opens as an attachment. No date filter whatsoever is applied.
    It is used properly before work.
    I also checked the settings/options of date format, but they seem to be properly defined exactly as before (according to the Italian standard DD/MM/YYYY).
    We run windows 7 and the Italian localization of tuberculosis, the most recent version.
    It's the same thing to my colleagues (we use Thunderbird in our office), and I checked that this change took place only who has auto-update function on. Once you update, you lose the ability to search by date criteria.
    Hope you can have a few clues about this problem, this proves to be quite annoying because it takes a lot of previous messages in search by date.
    Thanks in advance,
    Walter
    Italy

    You will open everything: config and check that mailnews.search_date_format has.
    Mine is the default = 0 and that gives 2015-04-30 (for me)
    (Tools / Option / advanced/general / config editor and search for this entry)

    Edit
    I tried a few variations. Take a peek inside

  • I am new to the ethernet communication using labview. I don't have any material. I have two laptop, I need to send and receive data through these 2 portable by using labview. Kindly help me on this.

    I am new to the ethernet communication using labview. I don't have any material. I have two laptop, I need to send and receive data through these 2 portable by using labview. Kindly help me on this.

    Dennis has already said: for a direct PC - PC connection, you need a cross over cable. If you connect through a router or a switch, you use a standard cable.

  • How to select the path of data through labview

    Hello gurus...
    I'm new user in labview. I want to read and write to the database via labivew. I have
    read and write the program. Now, I want to choose the way of storage of data through labview.
    I tried different ways, but I couldn't.
    First of all read and write the program I did via the UDL file path. Now, I want to choose ".mdb" file path directly.

    I do not know how...
    So if you know please help me...
    Thanks

    Concerning
    Joel M
    India

    Rather than trying to create an Access database, I have simply included a blank database with the installation.  Open, build the tables as required (as your example shows), and then copy (using the copy of the palette of Advanced File i/o) whenever you need it.  Your program will need to know where it is, therefore, store the connection information in a configuration file (as already mentioned) is a possibility.

    Here's how to use a connection string to open a database:

  • Easy way to search by date in Vista?

    Just updated from XP to Vista & cannot figure out how to find my documents by date.  I liked the search function on XP that would allow you to search by date, for example, created during the month, week, year, etc.  Is there an easy way to do this in Vista?  The instructions in the help of Vista are difficult to follow.  Help!

    Start typing a file name, and then click search everywhere which appears just above the area.  Will take you to the advanced search box.  Delete what you have entered to access the advanced search box and click search.  You will see a section for the date.  Enter the date you want, whether you want files on, before or after this date and if you want date of creation or modified date and click search.  Search will find the files you want.  Don't forget to select the basis of appropriate research (only the indexed locations or drive c:\ or something else) and whether or not you want to not indexed, hidden and system files included.

    I hope this helps.

    Good luck! Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • What is the procedure how to make my system image backup and data through Windows NAS Server?

    I work the iMac with bootcamp for Windows 7 - Home Premium.

    I want to return to the system image and data etc. of the 'Windows Back up and Restore' to my Synology NAS (network attached storage). When I do the setting changes, I could not find the option to connect to the NAS, but have only the offer to connect to the external hard drive.

    (1) the 'Windows Back up and Restore' allows to connect to the NAS for the back of my files, in particular for the iamge system? If not, any other method to make the back upward, especially for the system image?

    (2) what is the procedure how to make my system image backup and data through Windows NAS Server?

    Original title: save the Windows image

    Backup to a network location is not supported by Windows 7 Home Premium. Do you need Windows 7 Professional or ultimate edition.

    http://Windows.Microsoft.com/en-GB/Windows7/where-should-i-save-my-backup

  • Access the views Where the access to the underlying data, through a role

    I have a user (say User1) who granted select access to motherlode via a role table

    User1 has a bunch of useful views created I want User2 to have access to the. User2 should have access only to these points of view, not to the underlying table.

    User1 can grant access to his point of view because it has no direct access granted to motherlode tables.

    I managed, based on a technique that I have for the most part, but do not entirely understand, give User2 access to data through a function. The solution is below.

    My general question is: y at - it an easier way (other than the grant direct access to the motherlode User1 tables)?

    My question is: the definition is possible shorter somehow. I know I can automate the production of the code for some of the statements using metadata, but, for example, is it possible to base the declaration of type (t_p5) on the existing view? (I have about 15 views I need to provide access)

    Solution is, where v_p5 is the original view:

    User 1:

    CREATE or replace type t_p5 as an object

    (< columns and data types of v_p5 >

    )  ;

    CREATE or REPLACE TYPE t_p5_tab AS TABLE OF THE t_p5;

    FUNCTION to CREATE or REPLACE f_provide_p5 RETURN t_p5_tab

    PIPELINED IS

    l_cur SYS_REFCURSOR;

    l_rec v_p5% rowtype;

    BEGIN

    L_cur OPEN FOR ' SELECT * FROM v_p5';

    LOOP

    EXTRACTION l_cur

    IN l_rec;

    EXIT WHEN l_cur % NOTFOUND;

    GUIDELINE (t_p5 (area = > l_rec.region))

    , district_name = > l_rec.district_name

    , current_month = > l_rec.current_month

    , p_current = > l_rec.p_current

    , previous_month = > l_rec.previous_month

    , p_prev = > l_rec.p_prev

    , diffp = > l_rec.diffp

    , diff_perc = > l_rec.diff_perc

    , previous_year = > l_rec.previous_year

    , p_year = > l_rec.p_year

    , diffy = > l_rec.diffy

    , perc_diffy = > l_rec.perc_diffy

    ));

    END LOOP;

    RETURN;

    EXCEPTION

    WHILE OTHERS THEN

    raise_application_error (-20000, SQLERRM |) Chr (10) | l_sql);

    END;

    And user2:

    VIEW to CREATE or REPLACE v_p5 AS

    SELECT * FROM TABLE (User1.f_provide_p5);

    I can then do a select * from v_p5 in User2 and return the view data.

    Thank you.

    Hello

    Don't bother with the pipeline and PL/SQL functions.  Everything will be easier, more effective and more reliable if you use only views.

    Privileges through roles do not create a view on a table in another schema.

    If user1 can create a view on motherlode.table_x, then user1 should have direct privileges already (or user1 must have a privilege of system as SELECT ANY TABLE).

    User1 needs the same privileges WITH GRANT OPTION in order to grant privileges on his point of view to User2.  To do this, have motherlode grant privileges to user1, like this:

    GRANT SELECT ON table_x to User1 WITH GRANT OPTION;

    GRANT SELECT ON table_y to User1 WITH GRANT OPTION;

    Repeat for each table that user1 uses in the views.

    Then user1 will be able to grant privileges on views to User2 like this:

    GRANT SELECT ON my_view_01 TO user2.

    This will NOT allow user2 directly see the motherlode.table_x.  User1 will have the power to give privileges to User2, but simply grant privileges on the view does not give User2 these privileges.

    If you don't want User1 to have this power, then create the views in the motherlode scheme, or create a new schema only for the putpose to own these views.

  • Loads of parallel data through SQL connect and replace existing data

    I'm doing a load of multiple data through SQL Connect using the following statement.  Just try to put in place a .bat file to automate the process but not sure that whenever it executes this statement adds data to existing or replaces the data? I tried to write an override for this but it works for instructions which contain the import section.

    Import of database data App.DB connect as username identified by password

    with the help of several rules_file, rul1, rul2, rul3

    load_buffer_block starting with buffer_id 10 on error write to 'C:\\dataload.err ';

    We can add spec commit buffer such as "replace all data ', 'create group', 'Add' to this import statement? The default declaration overrides the value whenever the data is loaded?

    Thanks in advance!

    you have an option in the rules file "Overwrite out of values."

    rulefile > setting dataload > loading values

  • I have a new macbook pro and want to install CS3 on it. I followed all the download links. Found my serial number for my Adobe account and get up to date through the whole &amp; get this message ' put in place has encountered an error and cannot continue,

    I have a new macbook pro and want to install CS3 on it. I followed all the download links. Found my serial number for my Adobe account and get up to date through the whole & get this message ' put in place has encountered an error and cannot continue, contact adobe customer support for assistance ' all I want is for CS3 to install on my new computer so I can continue to work and do not have to spend hours working it help Please. CC is not an option, because I work in a country with no reliable unlimited internet access

    New computer means new problems of system operating with the OLD software means

    Fix possible Mac 10.10.4 (at least for Premiere Pro) https://forums.adobe.com/thread/1891705

    10.10 mac. ? sometimes has problems, often related to the 'default' permissions that need to be changed

    -solution https://forums.adobe.com/thread/1689788 of a person

  • Can the vcenter server that an ESX host is connected to determine through query of the esx host cmd line?

    Can the vcenter server that an ESX host is connected to determine through query of the esx host cmd line?

    All points will be awarded. Thxs.

    Look in

    /etc/opt/vmware/vpxa/vpxa.cfg
    

    you will see that the IP VCMS listed something like

    1.1.1.1
    
  • Hide weekend Dates


    How can I use the (#DayofWeek (datefield) # NEQ 1 or 7) on the loop following code to remove (no display) weekend dates?

    Gotcha Phil, I misunderstood.

    Anyway, here's the code that worked for my loop:









  • How to search between dates (date ranges)

    Is this possible in APEX to search between dates (date ranges) records in a report page? Like "DATE between P5-DATE AND SYSDATE? Thanks in advance.

    This might work:

    SELECT secuencia_pk, nombre_accidentado, num_caso_legal, numero_reclamante,
           num_seguimiento, status, descripcion
      FROM djur_registro
     WHERE INSTR (nombre_reclamante, NVL (:p2_nombre, nombre_reclamante)) > 0
       AND INSTR (nombre_accidentado, NVL (:p2_nombre_acc, nombre_accidentado)) >
                                                                                 0
       AND INSTR (num_caso_legal, NVL (:p2_num_legal, num_caso_legal)) > 0
       AND INSTR (numero_reclamante, NVL (:p2_num_reclamante, numero_reclamante)) >
                                                                                 0
       AND INSTR (num_seguimiento, NVL (:p2_num_segui, num_seguimiento)) > 0
       AND INSTR (descripcion, NVL (:p2_descripcion, descripcion)) > 0
       AND fecha_ocurrencia BETWEEN NVL (:p2_fecha_desde, fecha_ocurrencia)
                                AND NVL (:p2_fecha_hasta, SYSDATE)
    

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

Maybe you are looking for