Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Converting Oracle SQL functions to Access built-in functions

Discussion in 'Information Technology' started by GVR_Mike, Jul 28, 2006.

  1. GVR_Mike

    GVR_Mike
    Expand Collapse
    Guest

    I have some Oracle SQL code that was sent to me by one of our
    programmers. We have an Oracle back-end. We use Access to query Oracle
    but the programmers use Oracle directly obviously. I'm trying to
    convert his Oracle functions to Access built-in functions without
    having to delve into the VBA. I got most of them converted (UPPER,
    TO_CHAR, DECODE, etc) but am having trouble finding a way to convert
    the LAST_DAY function. Is there a way to use Access built-in functions
    to obtain the last day of a given month? I've seen ways to do it in VBA
    but want to avoid that if possible.

    Thanks.
     
  2. Loading...

    Similar Threads Forum Date
    Jehovah's Witnesses Are Out And Converting! Blogs Jul 31, 2016
    Basic Questions about Converting to Sikhism Questions and Answers Nov 15, 2013
    Converting to Sikhism Hard Talk Aug 31, 2012
    Why are people converting to Sikhism? Sikh Sikhi Sikhism Jul 1, 2012
    Question About Converting To Sikhism For A Married Person Questions and Answers Jun 3, 2012

  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    I don't know Oracle, so I don't know what you pass to the LAST_DAY
    function.

    If you've got a date, and you want the last day of the month that that day
    is in, use

    DateSerial(Year(MyDateValue), Month(MyDateValue) + 1, 0)

    If you've only got a month number, you have a bit of a problem. For all
    months but February, you can use DateSerial(2005, MonthValue + 1, 0).
    However, what do you want for February: 28 or 29?

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "GVR_Mike" <mjbruesch@triad.rr.com> wrote in message
    news:1151619938.304640.308780@d56g2000cwd.googlegroups.com...
    >I have some Oracle SQL code that was sent to me by one of our
    > programmers. We have an Oracle back-end. We use Access to query Oracle
    > but the programmers use Oracle directly obviously. I'm trying to
    > convert his Oracle functions to Access built-in functions without
    > having to delve into the VBA. I got most of them converted (UPPER,
    > TO_CHAR, DECODE, etc) but am having trouble finding a way to convert
    > the LAST_DAY function. Is there a way to use Access built-in functions
    > to obtain the last day of a given month? I've seen ways to do it in VBA
    > but want to avoid that if possible.
    >
    > Thanks.
    >
     
  4. Albert D.Kallal

    Albert D.Kallal
    Expand Collapse
    Guest

    You do realize that if you use a pass-through query from ms-access, and then
    all of your oracle syntax and functions will work from the query in
    ms-access?

    We are talking about linked tables from ms-access to oracle...right?

    If yes, then can you use a pass-through....you will NOT have to modify the
    sql, and can leave it in oracle syntax....

    --
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada
    pleaseNOOSpamKallal@msn.com
    http://www.members.shaw.ca/AlbertKallal

    "
     
  5. GVR_Mike

    GVR_Mike
    Expand Collapse
    Guest

    Hmmm....interesting, have never used pass-through queries so I didn't
    know what they did. I'll research them a little and see if I can get it
    to work. Thanks!
     

Share This Page