Migration from sql server to oracle

Hi
I have converted one sample procedure (SQLserver) to oracle.
Kingly suggest me if this conversion is fine or whether need to change ?

I greatly appreciate your help. I am grateful to you for this since I have no knowledge of SQL SERVER
Thank you again,
With kind regards,
ASH
SQL_SERVER_sample_procedure.docx
Oracle-conversion.docx
alsatham hussainOracle developerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sdstuberCommented:
These conditions won't work in Oracle as you intend

If v_FromDt = ''  THEN
ELSIF v_ToDt = '' THEN


A zero-length string is NULL in oracle and you can't check for null with an equality.
Instead write them like this...


If v_FromDt IS NULL THEN
ELSIF v_ToDt IS NULL THEN


Also in Oracle, you don't put column names inside brackets.
If you must use mixed case columns and/or columns with spaces in the names, then put the names in double quotes
For example
Instead of   [Bank Address]  you would use "Bank Address"


I'm not sure what you were trying to do here...

dbo.LON_RPT_fnDayOrderedColln (v_BrID, v_PrdID, v_FromDt, v_ToDt)

If you are using 12c, you can have procedures that return result sets, but that is not normal coding for Oracle
1
alsatham hussainOracle developerAuthor Commented:
Thank you for spending few minutes
thanks for your time ( thanx, thanx,,,,,)
thank you.
0
sdstuberCommented:
you're welcome, if nothing else, please close the question
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
alsatham hussainOracle developerAuthor Commented:
Thank you

ASH
0
alsatham hussainOracle developerAuthor Commented:
dbo.LON_RPT_fnDayOrderedColln (v_BrID, v_PrdID, v_FromDt, v_ToDt)

One stores function calling here


Thanks
ASH
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.