morechocolate
Technical User
I have a SQL Expression that was not returning the result that I had expected so I broke it (the expression) down to test the locate function. When I did the test it was returning 0 for all values and that, I know for sure, is not correct. Anyone have any ideas what I may be doing wrong?
FYI I am using Crystal 8.5
(select {fn LOCATE(p.loan_name, PHIST."LOAN")}
from loanhist p
where p.accounting_date = PHIST."ACCOUNTING_DATE" and
p.loan = PHIST."LOAN")
p.loan_name for example is Pottery 123456 (Note 1) and
loan = 123456
My understanding of the locate function is that it should look for the loan, 123456, within the loan_name and return the position of the first character of once located.
Thanks
FYI I am using Crystal 8.5
(select {fn LOCATE(p.loan_name, PHIST."LOAN")}
from loanhist p
where p.accounting_date = PHIST."ACCOUNTING_DATE" and
p.loan = PHIST."LOAN")
p.loan_name for example is Pottery 123456 (Note 1) and
loan = 123456
My understanding of the locate function is that it should look for the loan, 123456, within the loan_name and return the position of the first character of once located.
Thanks