Query to print all second saturdays of current year

Hi
I need help to write a query that prints all the second saturdays of current year.
Please help me.
Thanks in advance,

Quote:
DATE1
14-JAN-06
11-FEB-06
11-MAR-06
08-APR-06
15-APR-06
13-MAY-06
10-JUN-06
08-JUL-06
15-JUL-06
12-AUG-06
10 rows selected.This selects 2 rows fewer than there are months in the year. You've got 2 second saturdays in both April and July.
Quote:
MS
14-JAN-06
11-FEB-06
11-MAR-06
15-APR-06
13-MAY-06
10-JUN-06
15-JUL-06
12-AUG-06
09-SEP-06
14-OCT-06
11-NOV-06
09-DEC-06
12 rows selected.The 15th of a month cannot possibly be the second Saturday!
Try
SQL> select date1 from (select to_date('01/01/2006', 'DD/MM/YYYY') + rownum -1 date1
  2                        from all_objects
  3                        where rownum <= 365)
  4     where to_number(to_char(date1, 'DD')) between 8 and 14
  5     and to_char(date1, 'DY') = 'SAT'
  6  ;
DATE1
14-JAN-06
11-FEB-06
11-MAR-06
08-APR-06
13-MAY-06
10-JUN-06
08-JUL-06
12-AUG-06
09-SEP-06
14-OCT-06
11-NOV-06
09-DEC-06
12 rows selected.

Similar Messages

  • Reg: sql query that prints all sundays in the year

    Hi all,
    Please give me sql query that prints all sundays in year. And when ever we execute that query then that will prints the sysdate(that is execution date).
    Thanks in Advance,
    -prasad.
    Edited by: prasad_orcl on Jun 5, 2009 9:13 PM

    Hi,
    Plz try this and let me know this works or not...
    SELECT DATE DATES,TO_CHAR(DATE,'DAY') DAYS FROM FISCAL_CALENDAR
    WHERE DATE_YEAR = 2009 AND
    DATE BETWEEN TRUNC(SYSDATE,'YEAR') AND
    ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),12) -1 AND
    TRIM(TO_CHAR(DATE,'DAY')) = 'SUNDAY'
    ORDER BY DATE
    OUTPUT:
    DATES     DAYS
    1/4/2009     SUNDAY
    1/11/2009     SUNDAY
    1/18/2009     SUNDAY
    1/25/2009     SUNDAY
    2/1/2009     SUNDAY
    2/8/2009     SUNDAY
    2/15/2009     SUNDAY
    2/22/2009     SUNDAY
    3/1/2009     SUNDAY
    3/8/2009     SUNDAY
    3/15/2009     SUNDAY
    3/22/2009     SUNDAY
    3/29/2009     SUNDAY
    4/5/2009     SUNDAY
    4/12/2009     SUNDAY
    4/19/2009     SUNDAY
    4/26/2009     SUNDAY
    5/3/2009     SUNDAY
    5/10/2009     SUNDAY
    5/17/2009     SUNDAY
    5/24/2009     SUNDAY
    5/31/2009     SUNDAY
    6/7/2009     SUNDAY
    6/14/2009     SUNDAY
    6/21/2009     SUNDAY
    6/28/2009     SUNDAY
    7/5/2009     SUNDAY
    7/12/2009     SUNDAY
    7/19/2009     SUNDAY
    7/26/2009     SUNDAY
    8/2/2009     SUNDAY
    8/9/2009     SUNDAY
    8/16/2009     SUNDAY
    8/23/2009     SUNDAY
    8/30/2009     SUNDAY
    9/6/2009     SUNDAY
    9/13/2009     SUNDAY
    9/20/2009     SUNDAY
    9/27/2009     SUNDAY
    10/4/2009     SUNDAY
    10/11/2009SUNDAY
    10/18/2009SUNDAY
    10/25/2009SUNDAY
    11/1/2009     SUNDAY
    11/8/2009     SUNDAY
    11/15/2009SUNDAY
    11/22/2009SUNDAY
    11/29/2009SUNDAY
    12/6/2009     SUNDAY
    12/13/2009SUNDAY
    12/20/2009SUNDAY
    12/27/2009SUNDAY
    Regards
    Thiyag

  • How can we import Fixed asset of the current year ?

    Hi ,
    in 1272578 note , SAP Support explain that's it's not possible to create fixed asset of the current year( example = acquisition date = 2009-02-01 )  using import , but they gave no workaround .
    does it mean that we have to manually create all assets of the current year ? or there is another way ( using DI-API for example ) ?
    Thanks

    Good day
    The fixed asset master data import functionality in SAP Business One is used to import assets of the previous year. If you are to force the importation of current year assets some of them might load but system will not be able to calculate planned depreciation for that year, which will give u problems when u try to run depreciation forcing u to post manual depreciation.
    With manual depreciation will not look good on the Fixed Asset Master since it sort of duplicate depreciation ONLY on the Master your report will be fine.
    Capturing Current year assets manually will be the safer road.
    Thanks
    Louis

  • I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page, but not all or pages 1-5.  Can this be overcome?

    I am trying to print all the PDF pages in a range of 5 pages but can only print one page at a time . . . It will print the current page only, but not all or pages 1-5.  I need to go to the next subsequent page and command to print current page; continuing with this procedure until all pages are printed one at a time. Can this be overcome?

    You can use printPages(1, 5), however I need to know how you print current page.

  • I can only print the current page of downloaded pdf's.  Not able to print "all".  I'm using a Macbook air.

    I can only print the current page of downloaded pdf's.  Not able to print "all".  I'm using a Macbook air.

    it says "the document could not be printed".  "There were no ages selected to print".
    I selected "all".  I always tried selecting pages "1-3".
    The only choice that works is current page.  Very strange.

  • We recived  ipads today in school to use as a tool and they said if i sync it to my itunes my itunes will be erased and all the ipad stuff currently on there would be erased the second i connect to the school i was wondering if this was possible?

    we recived  ipads today in school to use as a tool and they said if i sync it to my itunes my itunes will be erased and all the ipad stuff currently on there would be erased the second i connect to the school i was wondering if this was possible? i already pointed a couple things that they said was true but were false like useing that find my ipad thing were it just zooms in on your location they also said it would beep and they can track it anywhere witout a 3g network which we use the wi fi. teachers can connect to itunes i belive becasue they don't have the same rescrtictions as use students but early in the year they said one teacher tried and failed with the results that said would happen to  use. besides ristrictions like loseing the app store and not being aloud to open any app wemb adresses we are to add  music via the itunes that i already on the ipad. i was just wondering if there full of it right now because i think they are.

    If I were a teacher setting up iPads to be used at school/work, I wouldn't link it to my personal iTunes, rather I'd create/use a different one. If for no other reason than to keep the kidlets and your fellow teachers from possibly accessing your account.

  • How to make every second saturday of month "OFF"  for all the employees..

    Dear Experts,
    Please help me with this query. Requesting you to explain the concept/logic and give configuration/navigation path to do it.
    Regards
    Ahmed.

    Hi,
    I hope you know about Daily work schedules and Period work schedules(PWS)
    1. You will need to create a PWS like
    NORM NORM NORM NORM NORM NORM OFF ( Only sunday off)
    2. Create 12 fixed day public holidays using SCAL and inlcude them in holiday calendar. These holidays should have date as second saturday of every month and public holiday class say 9.
    3. You will have to use DWS variant rules to replace NORM with OFF on these saturdays.
    4. Also you will have to give appropriate day type to these second saturdays in day rules
    Check these links
    2nd and 4th saturday off problem
    check my solution in the below thread. He wanted first working and rest saturdays as off. In your case first will be off and others will be working. If you have difficulty let me know.
    Workschedules generation with first saturday working rest Off
    cheers
    Ajay

  • Printing all permutations

    Hi,
    My sister is a CS student, and she currently learns recursion. She's got an exercise is to write a program that gets an array of integers and recursively prints all of its permutations (all elements in all possible orders).
    For example, if the input array is {1, 2}, the program should print this:
    1 2
    2 1
    The code was not too difficult to write, and it works now. The exercise has a second requirement, though, that the output of our program should be identical to the output of the school solution. That is, it's not enough that we print all permutations, we must do it the same order as they do.
    And that's where we're kind of stuck, because the order of the output in the school solution is not the same as ours, and we're unsure how to modify our code reproduce their output.
    For example, for input array {1, 2, 3}, our code would print
    1 2 3
    1 3 2
    2 1 3
    2 3 1
    3 1 2
    3 2 1
    whereas the school solution would print
    1 2 3
    1 3 2
    2 1 3
    2 3 1
    3 2 1 //last 2 lines come in reverse order
    3 1 2
    More (off site) examples
    {1, 2, 3, 4}: http://rafb.net/p/I2DMPZ57.nln.html
    {1, 2, 3, 4, 5}: http://rafb.net/p/EkQoJ668.nln.html
    {1, 2, 3, 4, 5, 6}: http://rafb.net/p/RVBtVf67.nln.html
    If somebody can identify a pattern in the school solution, please give us a hint as to how we should match it with our code.
    The relevant part of our code is here: http://rafb.net/p/4oEsMB53.nln.html
    Thanks

    thanks for your input.
    its always good to have something to kick start you into thinking again :). rather than starting blankly and tugging your hair.
    anyway .. unfortunately none of the workarounds seemed to work out. they did seem to be describing a slightly different problem though - one where the text appears but the window does not scroll .. i don't get any text at all until the end (and then it does scroll).
    i tried it out with a standard TextArea and got the scrolling, the problem is it is much slower than when i run it at the command prompt, and it slows down further. is this anything to do with its running lower on memory (as cmd prompt discards most of the data as it generates more), so do i need to fix that first to cure this, or is it a problem with the TextArea. and will it be a problem with any component i choose to print out on? i guess if it is ill just have to scrap that idea.
    thanks again
    btw - u are right, it shouldve been long - i'd corrected it since i posted the code .. sorry

  • Query for printing report if field 1 = x

    Forgive me if this is the wrong place to put this, My first time on here.
    I want to run a query in management studio 2008r2.
    The query goes like this:
    SELECT        [Default Branch ID], [Contact Title], [Contact FirstName], [Contact LastName], [Phone Home], [Phone Work], [Phone Mobile], [Marketing 1]
    FROM            Customer
    EXCEPT I want to display only entries that match [marketing 1] (Customer birth month) with current date. EG print all customers with details who have a birthday this month.
    How would I go about this?
    Thanks in advance!
    Ryan

    Hi
    There's no native way to automatically run a query and print from Management Studio.
    However are some native ways to push an email if that's any help:
    You could write a
    SQL Server Agent job to be scheduled once per month to send an
    email with information (not available on express and you need to setup dbmail)
    You could set up a
    Data Drive Subscription in Reporting Services to do much the same (Enterprise or BI Editions only). 
    Alternatively you could look at non-native solutions such as
    this. You're into the realms of windows scripts then.

  • Current year Previous Year in Query

    Hi,
    I have to get the results of current year 12 months( 12 columns) previous year 12 month( 12 columns) in one report.
    Once the user gives the current year , how to automatically populate the previous year. The PY varaint can be used for all months of previous year.
    Any thoughts on this, please let me know.

    As venkat said , using offset is the best option, rather than jumping directly to custom exit variable.
    for e.g.
    you report display is
    net qty.............net qty
    current year......  previous year........
    bil1
    bil2
    so u intend to see the net quantity for current year and previous year.
    Bring net qty... in Columns in query designer.
    Now right click and hit Edit
    Now bring in time chara. that u wish to use and want to create variable for.................
    for e.g. say fiscal period....
    Now hit fiscal period with right click andhit  Restrict.
    Go for Interval variable if already exist or else create a new one.
    hit okey..
    now in query designer in columns copy ur net quantity
    now paste there again.
    in Second net quantity u can hit edit.
    now where fiscal period is there hit restrict
    in dialog box hit Select offset.
    As ur intention is for previous year, keep the offset value as -12
    also restrict fiscal year variant in selection.....
    hit okey
    test it...
    if this doesnot work
    then go for custom exit....

  • Print All Items in Dunning

    My dunning configuration:
    Using Contract Accounts Receivable and Payable
    Dunning Procedure 1 has 4 levels
    10 - Late charge (set at 5%)
    20 - 1st reminder
    30 – Final notice
    40 – Disconnect document      
    Limits are set at $200 for L20-40.
    “Print all items” is active at L20-40
    Test result:
    1st Bill for $250 causes a late charge (L10 charge $12.50) and the $250 progresses to L40, dunning balance is $250 at L20-40.
    No payment made
    2nd bill includes $250 previous balance, current charge of $250, and the late charge of $ 12.50 for a total amount due of 512.50.
    Dunning runs result in late charge (L10 charge $25.63), L20 Dunning balance is 262.50 ($250 + $12.50), L30 Dunning Balance is $262.50, L40 Dunning balance is $512.50 ($250 + $250 + $12.50).
    I assume the dunning behavior on the second run results from “print all items” only including previous due amounts whose dunning level equals the dunning level being processed. Since all of the previous items (from bill #1) had reached L40, there was nothing for L20 and L30 to pick up on the second run. Is this correct? My issue is my client requests that L20 and L30 dunning balance on the second run include the total amount due ($512.50) as L40 does. Is there a way to configure the system to achieve this result? Thanks in advance.

    Hi, all
    I too have same problem to solve for my client.  Please help us to find a solution for this.
    Thanks in advance

  • How to print all columns in one page

    Hi,
    Can anybody explain me how to print all columns in one page.we have around 15 to 20 columns for 4 reports and all these reports are build on one multiprovider.we are using BW 3.5.
    Can anyone explain me  how to print ALL COLUMNS IN ONE PAGE  .currently they are getting all columns in 2 to 3 pages. They are using PORTAL to run the reports here.
    Is it possible to do by customizing Webtemplate or by macros in Workbook.Please help me
    Edited by: kotha123 on Oct 11, 2010 5:58 PM

    Hi,
    Your best bet is to use a workbook template or else Excel to pdf option...Thanks

  • My problem is that after printing the first photo or picture, when I come to print a second, both the Colour Management and Epson Colour Controls are greyed out and showing No Colour Management

    I have recently purchased a Mac computer (updated to Maverick) to go with my Epson Stylus Photo RX500 printer which has given excellent service with my old Windows computer. However, when trying to print pictures or photos via Photoshop Elements 11, the best results I can get are using the Colour Management and Epson Colour controls in the printing options box.
    My problem is that after printing the first photo or picture, when I come to print a second, both the Colour Management and Epson Colour Controls are greyed out and showing No Colour Management, The only way I can reset the controls is to shut down the printer and computer and restart.
    Could there may be a setting somewhere that I need to adjust please?  I have been in touch with Epson and they say that the Epson Colour controls are part of the Photoshop Elements software but a post on the Adobe forum brought no results and I am unable to contact Adobe.
    <Edited by Host>

    Hello Garry. Thanks for the reply. I guess I should have used a different title from "How do I post a question?" That should come after trying to resolved the colour settings first. However, to answer your question, after experimenting with all the different settings in Photoshop Elements and Epson software, I now start with PSE11 Colour settings then click "no colour management" then after clicking Print, I choose "More Options/Colour Management/Colour Handling/Printer Manages Colour" then I choose "Page Setup/Layout/Colour Matching" which then shows Epson Colour Controls but I also choose "Layout/Colour Management" which then shows "Colour Controls/Mode" I then of course choose an Epson printer profile depending on the paper I am using. I get good results but as I said, the Colour Matching and Colour Controls are then greyed out. Hope that makes sense.

  • How to print all pages using ALV from CL_SALV_TABLE?

    Dear friends,
    I have a report which displays a dynamic internal table using CL_SALV_TABLE. The display format is normal list.
    And since this dynamic internal table is big, I have divided it into a sub internal table which displays 10 columns in one page at one time. And each page is displayed using a customized button that I set as MyFunction.
    The problem is, when I click List->Print or Ctrl-P, the system will only send to spool the current page even though in the Print dialog box, I choose Print All option.
    Is there a way to rectify this? Thanks.

    Hi,
    Try this..code...the above FM expects purchasing organization..revised code below mentioned..
    please try..
    DATA: kdy_val(8) VALUE '/110'.
      SET PARAMETER ID 'LIF' FIELD 'VENDOR'.   " Pass the vendor
      SET PARAMETER ID 'KDY' FIELD KDY_VAL.
      CALL TRANSACTION 'XK03' AND SKIP FIRST SCREEN.
    Thanks
    Naren

  • How not to print all the pages of a smartform? (for tr F150 - Dunning)

    Hi Forum
    We have the follow situation:
      For DUNNING (transaction F150) the user want stamp 3 diferents SMARTFORM.
       For the first time the transaction is executed is required only a list of documents, for the second time (via sample printout, indiv dunn notice or dunn history)  once the legal data of the customer is updated, the user wants the list of documents, a letter for the lawyers and a letter for the client, in the follows executions  (3 and up) the user can require only the list of documents or all smartforms (list and letters)
      Via customizing we can control the normal dunning and the legal dunnig, but once the client is in legal status the transaction create only the legal smarforms.
    We found  an user exit associated  EXIT_SAPF150D_001. in the F150 transaction, but is not complete, in sense that are failed some parameters .
      Another option is create an unique smartform with 3 pages where we can control the case for the print, but here is where we ask: How we can do to print a specific page of the smartform without print all of them (how can we print the 2nd and 3rd page without print the firs one) ??
    To control the 3rd execution, we can create a dictionary table with a flag .
    Thank you for your help

    You could create a report containing all the single reports in one using UNION. This report could be placed on a "hidden" page. The link for downloading that report you can place on your page. That should work.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494

Maybe you are looking for

  • FTP connection in J2ME

    Hi All, can anyone tell me is FTP connection in J2ME possible or not? If it is possible, how it is possible? Mahabub

  • Kernel Panic and Application Crashes when Accessing a Folder

    Hi, I originally posted in the iTunes forum (http://discussions.apple.com/thread.jspa?threadID=252516&tstart=75) with this problem as it was in iTunes where I first noted the issue. However since then I have discovered it is a system wide issue. Ever

  • Implementing addAll() method for a Queue

    I'm trying to optimize some code I have written which include a addAll(Collection c) method and was wondering if there was a better way to do. I need to check the content on the list before adding new elements as I don't want to have any duplicate. p

  • I dropped my itouch in water.  no light

    I've done as much as I can to dry it.  Now it is "fuctional" with no light ... if I get into voice commands, it works .. held in just the right light I can see the screen and everything works.  At this point it's a total loss so I'm willing to try an

  • NI SCOPE troubles (PXIe- 5622)

    I've been having this problem since sometime now. I have a PXIe-5663 Vector Signal Analyzer, which has a PXIe - 5622 IF Digitizer module. Someone recently installed some update on the NI SCOPE driver and now it's nowhere to be found. I cannot find th