Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7086961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:36:54+00:00 2026-05-28T07:36:54+00:00

I am converting a 300 line sql server query to Oracle, some statements have

  • 0

I am converting a 300 line sql server query to Oracle, some statements have me stuck, any help here would be fantastic:

1. SELECT L_SPLIT_DATE = NULLIF(SPLIT_DATE, CONVERT(DATETIME, '20000101', 112)) + 1
    FROM OGEN.GEN_P_ARCHIVE

 ----- Not sure about NULLIF and CONVERT. Datetime i think has to become DATE.

2. IF @@ROWCOUNT = 0  

   ---- 2 "@' signs, do I just remove them both?

3. SET @L_EDT = DATEDIFF(dd, 0, DATEADD(dd, 0, @P_EDT)) + (@L_EDT - DATEDIFF(dd, 0, DATEADD(dd, 0, @L_EDT))) + CASE WHEN @L_SDT > @L_EDT THEN 1 ELSE 0 END;

DATEDIFF, DATEADD, are these the same in Oracle?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:36:54+00:00Added an answer on May 28, 2026 at 7:36 am

    As for the SELECT

    SELECT NVL(SPLIT_DATE, TO_DATE ('20000101', 'YYYYMMDD')) + 1 AS L_SPLIT_DATE FROM OGEN.GEN_P_ARCHIVE
    

    As for ROWCOUNT that is a bit more complex – without context that is hard to answer.

    As for DATEDIFF and DATEADD – in Oracle you can just work with - and +, Oracle interpretes the operands as DATE and “number of days” (can be floating point) respectively.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Converting a couple stored procedures from MySQL to Microsoft SQL server. Everything is going
Converting to ODB.NET from System.Data.OracleClient and need help converting my connection string. Here is
I have some task in my script that is about converting video with ffmpeg
Is converting a file to a byte array the best way to save ANY
I'm converting an application to use Java 1.5 and have found the following method:
Converting from usind Micorsofts Syste.Data.OracleClient to what I believe is called Oracles ODT (Oracle.DataAccess
I have a more or less good working query (concerning to the result) but
I have a Java app, connecting through TCP socket to a server developed in
I am currently scraping some data from the internet and converting into xml documents.
I have a array with about 300 indexes and each index has about 8

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.