LAE

 View Only
  • 1.  Compare Two Columns From the Same Dataset where Column X = INSTR(Column Y, 0, 1)

    Employee
    Posted 04-17-2019 09:29

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: sheryle_paisley

    Does anyone know how to convert this sql to BrainScript?

    case when COLUMN X = INSTR(COLUMN Y, 0, 1) then 'Y' else 'N'


  • 2.  RE: Compare Two Columns From the Same Dataset where Column X = INSTR(Column Y, 0, 1)

    Employee
    Posted 04-17-2019 09:46

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Originally posted by: sheryle_paisley
    					

    Does anyone know how to convert this sql to BrainScript?

    case when COLUMN X = INSTR(COLUMN Y, 0, 1) then 'Y' else 'N'
    The syntax of your request looks off.

    To search for X in Y:
    if findStr(Y,X) >-1 then 'Y' else 'N'

    To compare a substring:
    if X = substr(Y,0,1) then 'Y' else 'N'


  • 3.  RE: Compare Two Columns From the Same Dataset where Column X = INSTR(Column Y, 0, 1)

    Employee
    Posted 04-17-2019 11:16

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: sheryle_paisley

    Oh, Thank you... I missed some of the code...
    I'll give it a try.