I have some embedded SQL that is returning some not-so-correct answers.
:S5bmcmporg = 'SC09XX00'
When I run the query I get nothing.
In the database SC090400 defiantly exists and should be coming up as an option. Also, the color 04 exists in confil so the inner join shouldn't be failing either.
Does anyone have any ideas on why the query is returning nothing?
SQLCOD=000000
SQLSTATE=2000
Moreover, does a SC09%%00 work with a like? It seems like the two zeros at the end might cause an issue (even using the wrkqry doesn't seem to want to be able to use the %% with zeros after. But If I use SC11%%%%SA (for example) it works just fine)
Code:
SELECT DISTINCT cfcode,cfdsc1
FROM items AS itm INNER JOIN confil AS con ON cftype= 'COLR' AND cfcode = SUBSTR(ititm#, 7, 2)
WHERE ititm# LIKE TRANSLATE(:s5bmcmporg,'%','X') AND
itact = 'A';
When I run the query I get nothing.
In the database SC090400 defiantly exists and should be coming up as an option. Also, the color 04 exists in confil so the inner join shouldn't be failing either.
Does anyone have any ideas on why the query is returning nothing?
SQLCOD=000000
SQLSTATE=2000
Moreover, does a SC09%%00 work with a like? It seems like the two zeros at the end might cause an issue (even using the wrkqry doesn't seem to want to be able to use the %% with zeros after. But If I use SC11%%%%SA (for example) it works just fine)






Comment