DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Pl/sql query

  1. #1
    Join Date
    Mar 2003
    Location
    Bangalore, India
    Posts
    11

    Pl/sql query

    I want records depending on the EXDate. Supposing I make a query now, the put put should have all the records till now excluding SATURDAY AND SUNDAY records.At any given point of time, I want records dated five days back from the present date.

    CorpActionType SecurityID NewSecurityID EXDate RecordHoldingDate PayableDate NewShares
    -------------- ---------- ------------- ---------- -----------------
    LIQ 46261Y102 NULL 20021007 20010118 20020927 NULL
    TENDER 85590A203 NULL NULL 20030110 NULL NULL
    REVSPL 316850106 316850304 NULL 20020923 20021011 1.0000000
    MERGER 704508100 278642103 NULL 20021003 NULL NULL
    TENDER 364760108 NULL NULL 20021009 NULL NULL
    TENDER 678002106 NULL NULL 20030107 NULL NULL

    I want it something like this:

    select CorpActionType, SecurityID, SecurityDescription, NewSecurityID,
    EXDate, RecordHoldingDate, PayableDate, NewShares from CorpAction_AssetActionsReported
    where to_date.........

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Code:
    SQL> select * from xyz;
    
             X Y                  Z
    ---------- --------- ----------
             1 29-APR-03          1
             2 30-APR-03          4
             3 01-MAY-03          9
             4 02-MAY-03         16
             5 03-MAY-03         25
             6 04-MAY-03         36
             7 05-MAY-03          0
             8 06-MAY-03          8
             9 07-MAY-03         18
            10 08-MAY-03         30
            11 09-MAY-03         44
            12 10-MAY-03         60
            13 11-MAY-03         78
            14 12-MAY-03          0
            15 13-MAY-03         15
            16 14-MAY-03         32
            17 15-MAY-03         51
            18 16-MAY-03         72
            19 17-MAY-03         95
            20 18-MAY-03        120
    
    20 rows selected.
    
    SQL> select * from xyz
      2  where to_char(y,'dy') in ('mon','tue','wed','thu','fri')
      3  /
    
             X Y                  Z
    ---------- --------- ----------
             1 29-APR-03          1
             2 30-APR-03          4
             3 01-MAY-03          9
             4 02-MAY-03         16
             7 05-MAY-03          0
             8 06-MAY-03          8
             9 07-MAY-03         18
            10 08-MAY-03         30
            11 09-MAY-03         44
            14 12-MAY-03          0
            15 13-MAY-03         15
            16 14-MAY-03         32
            17 15-MAY-03         51
            18 16-MAY-03         72
    
    14 rows selected.
    Jeff Hunter

  3. #3
    Join Date
    Mar 2003
    Location
    Bangalore, India
    Posts
    11
    Hi Jeff,

    I am sorry. I did not see the reply immediately. Thanks for your help....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width