ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Find out the POSITION in a Field through SQL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Find out the POSITION in a Field through SQL

    Hi All,

    I am having a problem to find the position 'X' in a field (i.e. ARDIAG) as shown below.

    Diagnostic array

    X X

    position('X' in ARDIAG)


    SELECT position('X' in ARDIAG) FROM FILE1 WHERE x =95 gives me 12, for the first 'X' ..

    How can I know the 2nd 'X' position.......reply soon..
    Cheers
    PKBUNU

  • #2
    Re: Find out the POSITION in a Field through SQL

    code:
    Diagnostic array

    X X
    Cheers
    PKBUNU

    Comment

    Working...
    X