postgresql7.1
select to_char(current_timestamp, 'YYYY-MM-DD')
select to_char(current_timestamp, 'HH24:MI:SS')
select c.category_id, c.category_name,
s.subcategory_id, s.subcategory_name,
ss.subsubcategory_id, ss.subsubcategory_name
from ec_categories c
LEFT JOIN ec_subcategories s using (category_id)
LEFT JOIN ec_subsubcategories ss on (s.subcategory_id = ss.subcategory_id)
order by c.sort_key, s.sort_key, ss.sort_key