Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help,problem query !!

Re: Help,problem query !!

From: Adrian Weber <Adrion-Weber_at_t-online.de>
Date: Sat, 18 Feb 2006 15:49:01 +0100
Message-ID: <43F733DD.121D2C46@t-online.de>

Michel Cadot schrieb:
>
> "gab" <gmessad_at_tiscali.fr> a écrit dans le message de news: dom9ln$1ju$1_at_news.tiscali.fr...
> | Hello !!
> |
> | I've got a problem with a query,I would like to select some data from "
> | TbOrder"
> | table where the period date is from the 01/04/(current year) to 31/March
> | /( year +1 )
> |
> | This is my query but it's doesn't work :
> |
> | Select *
> | from TbOrder a
> | WHERE TO_CHAR(a.dat_cde,'DDMMYYYY')
> | between TO_CHAR('0104'||TO_CHAR(SYSDATE,'YYYY'),'DDMMYYYY')
> | to TO_CHAR('3103'||TO_CHAR(SYSDATE,'YYYY')+1,'DDMMYYYY')
> |
> |
> | Could you help me for this probleme !
> |
> | Thanks
>
> And to add to my previous posts in c.d.o.misc:
> - don't multipost
>
> Regards
> Michel Cadot

==
 Select *
 from TbOrder a
 WHERE TO_CHAR(a.dat_cde,'DDMMYYYY')
 between TO_CHAR('0104'||TO_CHAR(SYSDATE,'YYYY'),'DDMMYYYY')  to TO_CHAR('3103'||TO_CHAR(SYSDATE+1,'YYYY'),'DDMMYYYY')

........................................^^.
HTH ( didnt test it)
Berni Received on Sat Feb 18 2006 - 08:49:01 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US