oracle8.1.6 select ec_order_cost(:order_id) as total_amount, creditcard_id, case when sign(sysdate - confirmed_date - .95) = -1 then 1 else 0 end as youth from ec_orders where order_id = :order_id select transaction_amount as total_amount, creditcard_id, case when sign(sysdate-inserted_date-.95) = -1 then 1 else 0 end as youth from ec_financial_transactions where transaction_id = :transaction_id insert into ec_cybercash_log ([join [ad_ns_set_keys -exclude "cc_time" $bind_vars] ", "], cc_time, txn_attempted_time) values ([join [ad_ns_set_keys -exclude "cc_time" -colon $bind_vars] ", "], to_date(:cc_time, 'YYYYMMDDHH24MISS'), sysdate) select to_char(:n_hours_to_add / 24 + to_date(:the_date, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDDHH24MISS') from dual