Specific day

Hello,
Oracle 11.2.0.1
Windows XP
I need your help in below question please :
I need a select statement something like this :
Select <col1> if sysdate - 30 = 2nd Thursday of month from mytable; else
Select <col2> if sysdate - 30 = 3rd Wednesday of month from mytable else
no row.
I mean if if sysdate - 30 = 2nd Thursday of month then query should fetch col1 else if it is 3rd Wednesday of the month then col2 should be returned else no row.
Thanks.

You should be able to do something like
SELECT (CASE WHEN to_char(sysdate-30,'fmDAY') = 'THURSDAY'
                  AND to_char(sysdate-30,'DD') BETWEEN 8 AND 14
             THEN col1
             WHEN to_char(sysdate-30,'fmDAY') = 'WEDNESDAY'
                  AND to_char(sysdate-30,'DD') BETWEEN 15 AND 21
             THEN col2
             ELSE null
         END)
  FROM my_tableJustin

Similar Messages

  • Need to find a calendar to schedule multiple assignments with multiple tasks set on specific days for multiple people

    There may be no such animal as what I am searching for, but I thought I'd give it a try.
    What I need to do is find a calendar app that allows me to have individual calendars for staff members that I can place a several-days-long assignment and have those people access remotely on an iPad or iPhone (autosync).
    I also want to be able to have tasks set on specific days within that assignment that have alerts/reminders for each stage of the assignment.
    Being able to custom colour each individual assignment (not just the person's own calndar) is also necessary, as these asignments overlap and need to be easily distinguishable at a glance. Each assignment needs to be its own entity and not affect any furture or previous entries, even if I choose the same colour.
    It needs to be in a month by month view and be able to be something each person can subscribe to and sync up with for changes on a daily basis. It does nothave to be a calendar like in the screen shot below, it could be a linear calendar that has days across the top and assignments down the left side.....
    Here is a screen shot of a rudimentary excel spreadsheet I have been using. It is awkward and becoming unmanageable as the number of assigments increases and more staff are being added on. And I must send a new spreadsheet out every time I make a change or add an assignment, which is several times a week.
    I suspect I may be asking for the world, but if anyone knows a direction I can go in to start a search, I'd be grateful. I haven't had success of my own so far and need to find something soon.
    iCal doesn't work for me due to the fact I can only colour code the calendar itself and not the event, plus not being able to have multiple tasks within one event. And the qty of assignments I'd have would see most getting lost, eliminating my abilty to see every staff member's assignmanet at the same time.
    Thank you in advance if you have a suggestion and if not, thanks for looking at my dilemma! 

    check with T-code TPM44
    zashok

  • How can I gift an iPad app on a specific day, like birthday?

    In answering an earlier question (How can I buy a specific iPad app for someone else?) https://discussions.apple.com/people/King_Penguin gave the following helpful tip:  http://support.apple.com/kb/HT2736
    So far, so good (except that now I'll need to tip off the giftee by asking which email address he uses for iTunes). However... I have a new problem. How do I specify that the gift "arrive" on a specific day, such as a birthday? Dear Obvious Answer: No, I don't want the answer "Buy it on his birthday." I will be out of the country on his birthday, and away from internet/3g/4g connections. I need another choice.

    A different obvious answer: organise it, don't tell him until his birthday. If you cannot phone or text, tell him on a birthday card, posted (remember that?), if necessary inscribed "do not open until your birthday".
    We spend too much time wresting with technology to solve problems that would not even exist a few years ago. 

  • I am looking for an iPad App that will play a specific iTunes song, at a specific time, on a specific day?  Thank you all!

    i am looking for an iPad App that will play a specific iTunes song, at a specific time, on a specific day?  Thank you all!

    Sorry, i did not say that i need to go out further than 1 week.  This is for a church Bell Tower Music System.  So we don't want to have to re program the music every week.  We are looking for more of a Calender App that will play iTunes Songs for alarms...different songs, on different days.  IDEAS ANYONE ???

  • How to Run a Request Set on specific days and at specific hours

    Hi community,
    The question is simple, how to rin a Request Set on Specific Days and at Specific hours?
    Let me explain the scenario.
    E-Business Suite, Release 11.5.9.
    We have a request set under Sysadmin user. This Request set is running 24x7, during all year, and we want to restrict the execution from Monday to Friday since 08:00 a.m. to 20:00 p.m. in order to increase the productivity of our system and more over, to avoid the size increase of a table (OE_EXPOSURE_INTERFACE)
    The Request Set includes 5 Requests:
    10. Workflow Background Process.
    20. GUZMAN: Cálculo metodo pago en pedidos.
    30. GUZMAN: Exposición de crédito externo.
    40. Credit Exposure Import.
    50 Initialize Credit Summaries Table.
    As you can see three of them are standar Oracle Order Management Processes and two of them are custom Oracle Order Management Processes; and the requests must be executed in that order.
    We have just thinking about to create a Custom Manager with a workshift from Monday to Friday since 08:00 a.m. to 20:00 p.m., and include the requests as specialization rules or assigning those request to a Request Type and then include that Request Type as specializated rule, but this does not assure us that the request will be executed in that order.
    Any suggestion?
    Thanks a lot for your answer in advice.
    Luis.

    Hi Anchorage,
    It could be a solution, but not the exact solution that we want. Let me say why.
    With the Request set we have the security that each concurrent request is executed when the prior one finishes; is that to say 20, does not begin till 10 finishes, and 30 does not begin till 20 finishes and so on. The most critical concurrent requests are 40 and 50, cause those are the ones that import an external credit exposure in the OE_EXPORURE_INTERFACE table (40) and are the ones that delete those external credit exposures imported (50). The problem is (and we do not know why) that these actions makes grow the size of the table and each time the 40 and 50 processes takes more minutes to finish. That's why we need to truncate the table in order to avoid the excesive grow of itself.
    Making each process independent, with a begining time and hoping and expecting that the following one does not begin till the prior one ends is not an admisible or realizable solution due to the problem with the 40 and 50 processes.
    So at the end, we need a request set in order to know that each one began when the prior one ends.
    And Due to in order to truncate the table, as I said before, the processes that have a relationship whit it, must be stopped (just the 40 and 50 processes) prior to the truncation.
    So as you see, it is difficult, very difficult.
    Regards.

  • Can I set a recurring event which falls on a specific day

    I would like to set events in my Calendar which fall on specific days of the Week or Month e.g. 2nd Monday of each month; or the last Friday on the month.  I would be obliged if anyone can advise on how this can be done.

    That feature does not exist in the built in calendar app. What you see in the settings for recurring events is what you get. There are other calendar apps available in the App Store. Check some of them out and you might find one that suits your needs better.
    Look at this one.
    http://grid.birdsoft.biz/

  • How can I repeat an event in Calendar on a specific day.

    I want to set a repeat event on a specific day each month, like the Last Tuesday.  Also I'd like to set a quarterly repeat event.

    Using the native calander, the only options you have are those that pop up when you hit 'repeat'.  So if you are looking for a specific date each month, you are fine, but looking for the 4th tuesday, you are not fine.  You might search the app store for non apple alternatives.

  • Defining an exit variable for a specific day based on Fiscal Period

    If I do not have Calendar Day time dimension available for reporting is it possible to define a customer exit variable for a specific day.  The days are the first and last day of the financial year?
    Example
    User Input for Fiscal Period: 2009004
    The exit is to define a value for 01.01.2009 and 31.12.2008 (end of last year)
    Thanks

    Hello Niten,
    yes it is possible. Procedure:
    - add a new column in the report structure
    - hide this column
    - create a new text variable in this column (for customer exit)
    - now you can fill this variable during query execution based on 0FISCPER
    You don't want to filter by this variable. Right?
    Buy,
    André

  • How to get 2 Dates of a specific day From a Pay period

    Hi
    I have a date range (Pay period). now from the start date i Need to find out both Dates of a specific day of that Pay period.
    For Example If i know the date range is
    01/06/2007 to  01/19/2007
    Then I need to know what are the dates for both Saturdays.
    Here it should be 01.06.2007 and 01.13.2007.
    Please help. I always award points. Thanks
    Message was edited by:
            Anwarul Kabir

    Hi,
    Please try this.
    PARAMETERS: P_START LIKE SY-DATUM,
                P_END   LIKE SY-DATUM.
    DATA: DAYS    TYPE I,
          WEEKDAY LIKE DTRESR-WEEKDAY.
    DAYS = P_END - P_START.
    DO DAYS TIMES.
      CALL FUNCTION 'DATE_TO_DAY'
        EXPORTING
          DATE    = P_START
        IMPORTING
          WEEKDAY = WEEKDAY.
      IF WEEKDAY = 'Sat.'.
        WRITE: / P_START.
      ENDIF.
      P_START = P_START + 1.
    ENDDO.
    Regards,
    Ferry Lianto

  • In SQL server, how can I pass a date and return on any specific day of the week (e.g. Sunday/Monday/Wednesday, etc.)

    In SQL server, I want to be able to have a function to return the date of any specific day of the week by passing two parameters. E.g.:
    parameter 1: a selected date (e.g. 8/3/2013)
    parameter 2: any specific day of the week (e.g. Wednesday)
    result: should be 7/31/2013 (8/3/2013 is a Sunday in the week 7/28 - 8/3, so the Wednesday should be 7/31/2013)
    then if I want to get Saturday of that week, I can simply change the second parameter to 'Saturday'
    Thanks.

    Wrong forum:
    http://www.microsoft.com

  • Search for a specific day

    How do i filter a search to find all photos for a specific day and month for all years?

    Hmm.. Well, the only way I've been able to see that is to use filters, and control click on each year-day combo (using control/command click to select more than one entry) and LR will show them all.  You might then drag them into a collection...
    Of if you're not doing this a lot, you could create a smart collection and make a field for each year by "capture date" (which apparently won't let you add wildcard values).
    If nobody else has a better suggestion (quite possibly they will!), then you might put in a feature request to allow Date in smart collections to have a wild card.
    Cheers!

  • Headcount for a specific day

    Hi Gurus,
    I have installed the standard Business Content for Personnel Administration in BW. I have to calculate Headocunt for a specific day ( "As of day") in a query. How do I get about doing this. Any help is deeply appreciated.
    Thanks

    Hello John,
    I assume that user will entry the key date as on which the count has to be shown. This date variable cannot be based on a characteristic. It has to be a formula variable of date type, ready for input.
    Now, Create 2 more formula variables replacement path type for start date and end date.(we need these in calculation)
    Now create a formula(local CKF) and write:
    (key_date > stat_date && key_date < end_date )* count
    This will show the count of employees who joined after start date and who have not left till the key date entered by user.
    Count is the count of unique employee ids. It can be made as a formula in front end or a counter at the back end.
    Best Wishes,
    Mayank

  • Process chain in BW for specific day starting programm in ERP

    Hi guys,
    I have created a process chain in BW which works fine.
    Now I have to think about to include a step in this process chain which starts for one specific day one program in ERP.
    When this program in ERP is finished with updating data the process chain should continue and then the ERP data should be uploaded in BW.
    For example. Every 10th of a month a program in ERP should be started for the last day of the month before (for example 31.1.11). The program runs about 7 hours. When the program is finished the process chain shoul continue.
    Is that possible to handle with process chains?
    Thank you in advance!

    Hi,
    1. Make your existing chain as local chain.
    2. Create a process chain PC1 with a start variant and add above local chain.
    3. Schedule PC1 every day and restrict it not to run on 10th day of every month.
    4. Create a program or function module in ECC to execute your logic.(last day of last month as range).
    5. create a event in ECC.
    6. create a back ground job with step1 as program and step2 as event created in step 5.
    7. Create process chain PC2 in BI with start variant with event created in step 5.
    8. schedule the back ground job created in step 6 in ecc to run on evry 10th day of the month.
    If you do not want 2 pcs you can create only one PC based on variant from ECC. Add lIF condition in your ECC program
    to check if it is 10th of the month or not. If it 10th day execute your logic else complete the program with out executing any logic.
    so that back ground job will trigger step 2 (which is event) which will inturn trigger BI load.
    Thanks,
    Kalyan.
    Edited by: Kalyan.Undavally on Feb 8, 2011 6:30 PM

  • Is it possible to start a task always on a specific day of a week

    – I would like one of the task in my project plan to always start on specific day, like filling timesheet has to be necessarily to be started
    each Monday only and no other day irrespective of how other tasks are aligned on the project, is it do-able?

    Hi,
    Please refer to the link which shows step-wise details of how to do this -
    http://epmxperts.wordpress.com/2012/10/29/start-a-task-on-a-specific-day-of-a-week-only/
    Sapna Shukla

  • Share Outlook Calendar by subejct or only by an specific day

    I will like to share only Tuesdays or by subject from my outlook Calendar, how can I do that?
    Juan C Rivero Sharepoint Administrator [email protected]

    Hi,
    Generally, we can share one specific day’s calendar items to others by the following steps in Outlook:
    1. Open Outlook and switch to Calendar panel.
    2. Right-click your default calendar that you want to share. Click Share >
    E-mail Calendar.
    3. In the opening Send a Calendar via E-mail window, Select
    Specify dates in Date Range option.
    4. Then select the Start date and End date to specify a shared date.
    5. Click Detail to select permission.
    6. Click OK to add the shared calendar in E-mail.
    Then we can send the email to others.
    If you want to share calendar by the event subject, I think we can follow Ed Crowley’s suggestion to create another calendar for sharing.
    Regards,
    Winnie Liang
    TechNet Community Support

  • Script to launch app after power up on specific days

    Hello everyone,
    I've been using scripts more and more each day, and I've learned a lot just by trial an error, and of course, great help from the community. But now I have this one script that I just can't figure out how it would work, or even if it's possible.
    So the idea is to launch a specific app, after power up, on a specific day of the week. For example, say I want to have the app Mail to launch automatically after power up on sundays. How would I do that?
    Thank you so much!

    Hi anamorphis,
    I've never used launch daemons, but you could search for that. You could probably do it with that. I know how to use launch agents where you can run programs on user login. These two are similar, but there might be complications on running things on power up as compared to launch agents. Search for daemons. There is a lot of stuff like that on the internet.
    gl,
    kel

Maybe you are looking for

  • Java threads on machines with hundreds of cores

    I don't know if this is the right forum, but I try anyway. My problem is with java on machines with many cores. I have some large shared memory machines with 500 cores. When a user run java programs on these machines java starts 300+ threads which to

  • Setting up new MBP with SSD and optical drive and restoring from Time Capsule

    Hi Everyone- Sorry if this has been addressed before, but I couldn't find a specific answer by searching.  My last macbook was stolen, but luckily I had everything backed up in my Time Capsule.  I just ordered my new Macbook Pro (13"), 16GB Ram, and

  • Varying ON time pulse train generation using NI cRIO-9073 and NI 9401 module

    Hi,           I am a beginner to the Labview environment.  Am using NI cRIO-9073 and NI 9401 module; and NI Labview 2013. I want to generate 64 pulses, wherein the ON time of the pulses are varying as shown below. The Pulses need to have a constant p

  • Organizing by Album Name

    I notice that all artists are listed alphabetically, and the word the is ignored. However, all albums that begin with "the" are grouped together under that word. Is there anyway to have iTunes and iPod organize albums like artists, and have "the" be

  • Asking for passord each time

    My phone asks for my password each time I try to do something like make a call or check mail etc. How can I stop this from occurring?