oracle
8.1.6
sysdate
select to_char(sysdate, 'YYYY-MM-DD') from dual
select to_char(sysdate, 'HH24:MI:SS') from dual
select c.category_id, c.category_name,
s.subcategory_id, s.subcategory_name,
ss.subsubcategory_id, ss.subsubcategory_name
from ec_categories c, ec_subcategories s, ec_subsubcategories ss
where c.category_id = s.category_id (+)
and s.subcategory_id = ss.subcategory_id (+)
order by c.sort_key, s.sort_key, ss.sort_key
select c.category_id, c.category_name, s.subcategory_id, s.subcategory_name, ss.subsubcategory_id, ss.subsubcategory_name
from ec_categories c, ec_subcategories s, ec_subsubcategories ss, ec_cat_mailing_lists m
where m.category_id=c.category_id(+)
and m.subcategory_id=s.subcategory_id(+)
and m.subsubcategory_id=ss.subsubcategory_id(+)
order by decode(c.category_id, null, 0, c.sort_key), decode(s.subcategory_id, null, 0, s.sort_key), decode(ss.subcategory_id, null, 0, ss.sort_key)