Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Sql question
Hallo,
I have this sql query. I would like to change it so I could pick out the three forst three charachters in the between statements. How can I do that in the most simply way?
"and vgr in (between 1010000 and 1019999)
and vgr in (between 1040000 and 1049999) order by Avdnr ,Datum1
"
in the statement above I woul dlike to do the changing,
select substr(Avdnr,2) Avdnr , Dato Datum1, Dato datum2 , lpad(vgr,3) VGRP from kunlin A where transfil_id in (select transfil_id from transfil_dag where avdnr between 200000 and 299999 and dato between to_date ('2003-12-07','yyyy-mm-dd') and to_date ('2003-12-07','yyyy-mm-dd'))
and vgr in (between 1010000 and 1019999) and vgr in (between 1040000 and 1049999) order by Avdnr ,Datum1
Thanks in advance
Roland
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: roland.skoldblom_at_ica.se Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Jan 07 2004 - 04:04:26 CST
![]() |
![]() |