var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: If construct
Hi, in the following mysql select statement i use an if construct to get a sign changed in the recordset.
SELECT a.fieldone, a.fieldtwo, if(a.fieldone="x",a.fieldthree,-a.fieldthree) as myfield FROM mytable a
I would like to have the same result on an informix db. Is it possible? If so, what is the If syntax?
Many thanks in advance.
decode() is functionally similar.
Manual and examples here - IBM Informix Dynamic Server v10 Information Center
SELECT a.fieldone, a.fieldtwo, decode(a.fieldone,"x",a.fieldthree,-a.fieldthree) as myfield
FROM mytable a
Or CASE. Is more useful then decode() when an unknown kind of different cases have to be covered by ELSE.
SELECT CASE fieldone
WHEN 'x' THEN fieldthree
WHEN 'y' THEN ...
Dear players, do you need Gold for WOW? We provide you withWOW Gold, cheap WOW Gold, including
World of Warcraft EU Gold aWorld of Warcraft US Gold . Also we supply Metin2 Yang and Metin2 Gold to Metin2 players. Besides we also offer WOW Level Power Leveling.