Stump of a Muffin

MySQL CASE for 4.0

SELECT `r_mls_number` ,`r_address` ,`r_city` ,`r_area` ,`r_sub_area_community` ,`r_sub_area_community_desc` ,`r_list_price` ,`r_sold_price` ,`r_orig_price` ,`r_type_of_dwelling` ,`r_status` ,`r_list_date` ,`r_sold_date` ,`r_total_bedrooms` ,`r_total_baths` ,`r_floor_area_total_finished` ,`r_floor_area_unfinished` ,`r_last_trans_date` ,`r_street_name` ,`r_street` , `r_record_delete_flag` ,  CASE   WHEN r_street_dir = ‘Northwest’ THEN ‘NW’ WHEN r_street_dir = ‘Northeast’ THEN ‘NE’ WHEN r_street_dir = ‘Southwest’ THEN ‘SW’ WHEN r_street_dir = ‘Southeast’ THEN ‘SE’ ELSE ” END  AS street_dir , r_street_typeFROM rea WHERE r_last_trans_date >= DATE_SUB( CURDATE( ) , INTERVAL 1 DAY )

Post navigation

Comments are closed.