Solved

convert from sybase to oracle

Posted on 2008-10-28
3
345 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
  • 2
3 Comments
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
Comment Utility
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
Comment Utility
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 73

Expert Comment

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

just use standard arithmetic in Oracle
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now