Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Posts
    3

    Unanswered: problem with locate function

    The statement below doesn't work. I keep getting a sqlcode -171, sqlstate 42815. It will only run if I reverse the positions of code_value and :ws-all-codes. However, that result is not what I want. I want to find the string represented by the column name(code_value) in the string :ws-all-codes (which contains '22a 22b 22c'), not vice versa. Help, I'm dying here.

    select distinct dcn, code_value
    from zcbrs00.query_codes c where
    doc_type = 30 and
    query_control_cd = 4040 and
    locate(c.code_value,:ws-all-codes) <> 0

  2. #2
    Join Date
    Jan 2005
    Posts
    191
    Associated with sqlcode -171 are two tokens. What are they? How is :ws-all-codes defined in the program; what is the data type of code_value.

    James Campbell

  3. #3
    Join Date
    Feb 2005
    Posts
    3
    ws-all-codes is char(50) and code_value is char(18)

  4. #4
    Join Date
    Jan 2005
    Posts
    191
    and the two tokens are ?

Posting Permissions

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