Migration from sql server to oracle

alsatham hussain
alsatham hussain used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2012

Commented:
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
alsatham hussainOracle developer

Author

Commented:
Thank you for spending few minutes
thanks for your time ( thanx, thanx,,,,,)
thank you.
Most Valuable Expert 2011
Top Expert 2012
Commented:
you're welcome, if nothing else, please close the question
alsatham hussainOracle developer

Author

Commented:
Thank you

ASH
alsatham hussainOracle developer

Author

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

One stores function calling here


Thanks
ASH

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial