Results 1 to 3 of 3

Thread: Compare Two Columns From the Same Dataset where Column X = INSTR(Column Y, 0, 1)

  1. #1
    New Contributor
    Join Date
    Nov 2016
    Location
    Broomfield
    Posts
    4

    Default Compare Two Columns From the Same Dataset where Column X = INSTR(Column Y, 0, 1)

    Does anyone know how to convert this sql to BrainScript?

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

  2. #2
    Lavastorm Employee stonysmith's Avatar
    Join Date
    Nov 2006
    Location
    Grapevine Tx
    Posts
    799

    Default

    Quote Originally Posted by sheryle_paisley View Post
    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. #3
    New Contributor
    Join Date
    Nov 2016
    Location
    Broomfield
    Posts
    4

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •