Hello there.
First of all I must say that I am a newbie when it comes to MySQL Database.
Here is my problem.
The value of the field Variable
in my qTable could be positive or negative.
For negative value I have the correct output e.g. -97.
I need the output e.g. +11 when the value of the field Variable
is positive value.
I try this query, but I have this output: ±97
SELECT
CASE
WHEN INSTR('-', Variable) > 0 THEN
Variable
ELSE
CONCAT('+', Variable)
END 'Output'
FROM
qTable;
If you have link for similar task, please give it me.
Can you explain any one or any sample code related this.
Your help would be very appreciated.
thanks for your time and hints.
Thanks in advance,
Chevy.