Using Char(254) and field function
Posted: Thu Sep 11, 2014 9:19 am
I am getting some very strange behaviour when using the field function with char(254) as the separator and I wondered if anyone could shed some light on the problem.
Here is the data:
Col1
Debt Consolidation~~2~448
Char(254) is represented by the tilde character for clarity
If I use the following expression field(col1, char(254), 1) I get "Debt" returned instead of "Debt Consolidation".
If I use the following expression field(col1, char(32), 1) I also get "Debt" returned which I would expect.
When I output column positions 5 (space after "Debt") and 19 (tilde after "Consolidation) I get char(32) and char(254) as expected.
So why is the field function using char(254) behaving as if it's using char(32)?
Look forward to hearing from you.
Many thanks,
Bob.
Here is the data:
Col1
Debt Consolidation~~2~448
Char(254) is represented by the tilde character for clarity
If I use the following expression field(col1, char(254), 1) I get "Debt" returned instead of "Debt Consolidation".
If I use the following expression field(col1, char(32), 1) I also get "Debt" returned which I would expect.
When I output column positions 5 (space after "Debt") and 19 (tilde after "Consolidation) I get char(32) and char(254) as expected.
So why is the field function using char(254) behaving as if it's using char(32)?
Look forward to hearing from you.
Many thanks,
Bob.