Hi,
I have SQL from an access query that I need to translate to T-SQL that contains an IIF statement which needs to be changed to a CASE. Can someone tell what the syntax would look like for the below IIF statement within the SELECT statement?
SELECT DISTINCT LOWES_T2580_GIN_VBU.T2580_GIN_ID,
LOWES_T2580_GIN_VBU.ADD_DT,
LOWES_T2580_GIN_VBU.T617_FNC_TYP_CD,
LOWES_T2580_GIN_VBU.T1989_TGT_CRY_CD,
LOWES_T2580_GIN_VBU.T616_VBU_NBR, LOWES_T2580_GIN_VBU.T2582_GIN_STS_CD,
IIf([LOWES_T2580_GIN_VBU.MOD_IDF_TXT]<>" ", [LOWES_T2580_GIN_VBU.MOD_IDF_TXT], [LOWES_T2605_GIN_VBU_MRK1.SLL_ITM_IDF]) AS MOD_IDF_TXT, LOWES_T2593_GIN_CSM_UNT.SHT_DES_TXT AS [Vendor Description],
LOWES_T2580_GIN_VBU.BAS_UNT_IDC,
LOWES_T2580_GIN_VBU.CSM_UNT_IDC,
LOWES_T2580_GIN_VBU.LWS_CSM_UNT_IDC,
LOWES_T2584_PAK_HRC_TYP1.SHT_DES_TXT,
LOWES_T2593_GIN_CSM_UNT.WEB_PRD_IDC
Thanks!
C
I have SQL from an access query that I need to translate to T-SQL that contains an IIF statement which needs to be changed to a CASE. Can someone tell what the syntax would look like for the below IIF statement within the SELECT statement?
SELECT DISTINCT LOWES_T2580_GIN_VBU.T2580_GIN_ID,
LOWES_T2580_GIN_VBU.ADD_DT,
LOWES_T2580_GIN_VBU.T617_FNC_TYP_CD,
LOWES_T2580_GIN_VBU.T1989_TGT_CRY_CD,
LOWES_T2580_GIN_VBU.T616_VBU_NBR, LOWES_T2580_GIN_VBU.T2582_GIN_STS_CD,
IIf([LOWES_T2580_GIN_VBU.MOD_IDF_TXT]<>" ", [LOWES_T2580_GIN_VBU.MOD_IDF_TXT], [LOWES_T2605_GIN_VBU_MRK1.SLL_ITM_IDF]) AS MOD_IDF_TXT, LOWES_T2593_GIN_CSM_UNT.SHT_DES_TXT AS [Vendor Description],
LOWES_T2580_GIN_VBU.BAS_UNT_IDC,
LOWES_T2580_GIN_VBU.CSM_UNT_IDC,
LOWES_T2580_GIN_VBU.LWS_CSM_UNT_IDC,
LOWES_T2584_PAK_HRC_TYP1.SHT_DES_TXT,
LOWES_T2593_GIN_CSM_UNT.WEB_PRD_IDC
Thanks!
C