Author: CuriousMainframer
Subject: SQL query not working in Cobol program.
Posted: Wed Feb 22, 2017 5:56 pm (GMT 5.5)
Hi ,
I have embedded a select query to a DB2 table in my cobol program. The query is always returning a not found , when I add the statement
doc_update_ts <> '0001-01-01-01.01.01.000001' in where clause . returns a value when this statement is removed.
The row i'm trying to fetch does not have doc_update_ts as '0001-01-01-01.01.01.000001', so it should be returning me the row.
When I run the exact same query on toad or in SPUFI , it works fine.
Query is as below
Can someone please help be solve this issue.
coded
Subject: SQL query not working in Cobol program.
Posted: Wed Feb 22, 2017 5:56 pm (GMT 5.5)
Hi ,
I have embedded a select query to a DB2 table in my cobol program. The query is always returning a not found , when I add the statement
doc_update_ts <> '0001-01-01-01.01.01.000001' in where clause . returns a value when this statement is removed.
The row i'm trying to fetch does not have doc_update_ts as '0001-01-01-01.01.01.000001', so it should be returning me the row.
When I run the exact same query on toad or in SPUFI , it works fine.
Query is as below
Code: |
Select doc_name from doc where doc_id = '123' and doc_update_ts <> '0001-01-01-01.01.01.000001' order by audit_update_ts fetch first 1 row only |
Can someone please help be solve this issue.
coded