JustATheory
IS-IT--Management
Greetings,
I'm having trouble with this expression:
sum(case when regexp_instr(FieldName, 'Text') > 0 then 1 else 0 end) as NewFieldName
I want to read FieldName and sum the count of times 'Text' shows up and place that value in NewFieldName. 'Text' can show up in the string 0-n times, in real data 'Text' is varchar. What is happening is it finds the correct record but does not report the correct value in the new field. There is no pattern for the discrepancy, what am I doing wrong?
Any Help is welcomed,
JustATheory
I'm having trouble with this expression:
sum(case when regexp_instr(FieldName, 'Text') > 0 then 1 else 0 end) as NewFieldName
I want to read FieldName and sum the count of times 'Text' shows up and place that value in NewFieldName. 'Text' can show up in the string 0-n times, in real data 'Text' is varchar. What is happening is it finds the correct record but does not report the correct value in the new field. There is no pattern for the discrepancy, what am I doing wrong?
Any Help is welcomed,
JustATheory