Monday 10 February 2014

Query to Find Junk Characters in table

SELECT   okh.contract_number, okl.line_number, okl.attribute6, okl.sts_code
    FROM okc_k_headers_all_b okh, okc_k_lines_b okl
   WHERE okh.ID = okl.dnz_chr_id AND okl.attribute6 IS NOT NULL
  HAVING REGEXP_COUNT(okl.attribute6, '[''~!@#$%^&*(),+=}{;:><?]') >= 1

GROUP BY okh.contract_number, okl.line_number, okl.attribute6, okl.sts_code



once it is identified remove it by updating table using below query  

REGEXP_REPLACE(okl.attribute6,'[''~!@#$%^&*(),+=}{;:><?]',NULL)

Query to find submitted Concurrent requests

  Query to find Concurrent Requests SELECT      user_concurrent_program_name,      responsibility_name,      request_date,      argument_tex...