logs archiveIRC Archive / Freenode / #oracle / 2010 / February / 13 / 1
MTecknology
if I have a hire date, how could I convert that into a number of years that employee has been working there?
emp_years_worked := to_date(sysdate, 'YEAR') - to_date(emp_hire_date, 'YEAR');
what
what's wrong with that?
I tried with YYYY instead of YEAR
is there anyone alive in here?
brig
try to_number(to_date...))
MTecknology: select to_number(to_char(sysdate,'YYYY')) from dual;
MTecknology
brig: thanks
brig
ok
saw
hi guys. anyone familiar with sqlldr? i have problems adding a sequence as a first column in the table and then loading data with the sql loader.
though i have set the first col in the loader control file as I_BLOCKS_ID "SQ_BLOCKS_ID.NEXTVAL",
idletask
I don't use sequences, sorry
I don't use sqlldr either for that matter
TheBonsai
can't you do that usin an insert trigger?
saw
well, tried that as well
but i cant get sqlldr to ignore the first column in the database
so it always tries to fill the fist col from the data file into to the sequence column in the database
TheBonsai
?
you NAME the cols, don't you?
i mean, don't tell it what to ignore per se, tell it what to fill
http://www.orafaq.com/wiki/SQL*Loader_FAQ#Can_one_skip_certain_columns_while_loading_data.3F that one?
         

saw
well, that tells how to ignore cols in the file, not the table
(read that already as well)
TheBonsai
damn
Rudemeister
:>
« prev next »