?
Solved

convert from sybase to oracle

Posted on 2008-10-28
3
Medium Priority
?
388 Views
Last Modified: 2013-12-19
Hai !
        Can someone assist me to convert sybase code to oracle

1. datediff(dd, dateadd(dy,-1,getDate()), dateadd(dy,14,ShipDate) ) < 0
2. datediff(dd, getdate(), dateadd(dd,14,ShipDate) )=0
3.datediff(dd,ReceiptDate,ShipDate)
0
Comment
Question by:vishali_vishu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 22826285
all date math in Oracle is in days


1. ( (shipdate+14) - (sysdate-1) ) < 0
2. ( (shipdate+14) - (sysdate) ) = 0
3. (shipdate - receiptdate)
0
 
LVL 11

Expert Comment

by:mohammadzahid
ID: 22826286
Just replace datediff with month_between function in Oracle and getdate with sysdate

dateadd with add_months

goto this site for examples:

http://www.techonthenet.com/oracle/functions/index.php
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 22826319
months_between returns date differences in months, but the datediff examples above are in days.

just use standard arithmetic in Oracle
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question