I have a table with type field.
how can I check this field in query:
I want to check it if type == 'a'
then bes=amount,bed = '-'
ELSE bed=amount,bes = '-'
bes and bed is not really exists in my table but amount is (int)
this is my try:
SELECT billing.*,
CASE billing.type WHEN 'A' THEN billing.amount AS bes, '-' AS bed ELSE billing.amount AS bed, '-' AS bes END
FROM billing
... my searches wasn't useful
any solution...