Forum Stats

  • 3,781,314 Users
  • 2,254,500 Discussions
  • 7,879,640 Comments

Discussions

PL/SQL query

SQeeL
SQeeL Member Posts: 7 Green Ribbon

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.

Tagged:

Best Answer

Answers