LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Replace values from one column with another coulumn

    Employee
    Posted 11-30-2018 09:28

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

    Originally posted by: mw9286

    How would I replace the value of column "x_catalog_code", Only if populated with "VideoBasic" with the value populated with the value in the x_service_level column "U450"? Leaving all other value unchanged.


    BAN x_catalog_code x_service_level
    123456789 VideoBasic U450
    123456789 EPIX NULL
    123456789 MOVIE NULL
    123456789 HBOCIN NULL


    Thank you,

    Mike


  • 2.  RE: Replace values from one column with another coulumn

    Employee
    Posted 12-03-2018 06:56

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

    Originally posted by: ThomasT

    Something like this?

    node:Filter
    bretype:core::Filter
    editor:sortkey=5c05357333ac5a0f
    input:@40fd2c74167f1ca2/=Static_Data.40fe6c55598828e5
    output:@40fd2c7420761db6/=
    prop:Script=<<EOX
    __Code = if '_code' == "VideoBasic" then '1:x_service_level' else '_code'
    emit 'BAN x_catalog', __Code as "_Code",'x_service_level'

    EOX
    editor:XY=690,340
    end:Filter

    node:Static_Data
    bretype:core::Static Data
    editor:sortkey=5c05353939ef5b39
    output:@40fe6c55598828e5/=
    prop:StaticData=<<EOX
    BAN x_catalog,_code,x_service_level
    123456789,VideoBasic,U450
    123456789,EPIX,NULL
    123456789,MOVIE,NULL
    123456789,HBOCIN,NULL
    EOX
    editor:XY=580,340
    end:Static_Data