help for sql language
Posted in 1997
Topics: Migration, Import/Export & Data Conversion
Hi all, please help my concern to using SQL language.
My database stored 2~4 million record in one table a day
and all redords are stored in time basis which has start and end time fields
in day table, of course it has other information in the same record.
In above, I need to unload information to file from database and
I'm using SQL sentence as belows.
.......
isql xxx@yyy_tcp << EOF
unload to $outdir/zzz.txt
select * from $table
where id = "70" and etime >= "$stm;EOF
As I mentioned, all information stored in time sequende which is 00:00:00 ~
23:00:00 order and I unload files ever 30 minutes to makes 48 file a day.
However, I have some trouble in the afternoon because isql search
information from the start postion in table which takes time to collect
recent information.
So, I'd like ask anyone to collect information in reverse order from the
table in sql language.
your information will reduce my pain at this stage.
Sincerely