Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL query

SQeeLJul 16 2021

Hello,
I am trying to convert a PL/SQL query to T-SQL. I have the following part of a query that I'm trying to understand:
SELECT
CASE WHEN
DSS.FN_SSRS_VALIDDATE(DSS_T_D_SSA_MASTER2.DTE_BIRTH_MM || DSS_T_D_SSA_MASTER2.DTE_BIRTH_DD || DSS_T_D_SSA_MASTER2.DTE_BIRTH_CCYY) = 'Valid'
THEN
to_date(DSS_T_D_SSA_MASTER2.DTE_BIRTH_MM || DSS_T_D_SSA_MASTER2.DTE_BIRTH_DD || DSS_T_D_SSA_MASTER2.DTE_BIRTH_CCYY,'MM/DD/YYYY')
ELSE NULL END as SSA_DOB
FROM
[TABLE]
WHERE
[JOIN]

I understand the CASE statement operation and || (concatenation) but how should I interpret the statement after CASE WHEN? Is DSS.FN_SSRS_VALIDDATE a reference table (like a LookUp) and the statement inside the parentheses the reference value? And how does that compare to a T-SQL statement? Thanks for any help.

This post has been answered by Paulzip on Jul 16 2021
Jump to Answer

Comments

Processing

Post Details

Added on Jul 16 2021
2 comments
66 views