Hello!
I set a variable by adding values. Thus it is an integer. But later on I need it as a string. How can I convert it into a string?
Here's the code:
[tt]
-SET &MONAT1 = IF &MONAT GE '02'
- THEN &MONAT -1
- ELSE &MONAT + 11;
[/tt]
(where &MONAT is given by the user in a prompt)
Later I use it in a WHERE statement:
[tt]
WHERE MONAT EQ '&MONAT' OR MONAT EQ '&MONAT1'
[/tt]
The part OR MONAT EQ '&MONAT1' is not considered (the data is present in the database). I used also OR MONAT EQ &MONAT1 but then I get the error message
"(FOC280) VERGLEICH ZWISCHEN ZIFFERN UND BUCHSTABEN NICHT MÖGLICH"
which translates into comparison between numbers and characters is not possible. That's why I'd like to have the variable &MONAT1 as a string.
Eva
I set a variable by adding values. Thus it is an integer. But later on I need it as a string. How can I convert it into a string?
Here's the code:
[tt]
-SET &MONAT1 = IF &MONAT GE '02'
- THEN &MONAT -1
- ELSE &MONAT + 11;
[/tt]
(where &MONAT is given by the user in a prompt)
Later I use it in a WHERE statement:
[tt]
WHERE MONAT EQ '&MONAT' OR MONAT EQ '&MONAT1'
[/tt]
The part OR MONAT EQ '&MONAT1' is not considered (the data is present in the database). I used also OR MONAT EQ &MONAT1 but then I get the error message
"(FOC280) VERGLEICH ZWISCHEN ZIFFERN UND BUCHSTABEN NICHT MÖGLICH"
which translates into comparison between numbers and characters is not possible. That's why I'd like to have the variable &MONAT1 as a string.
Eva