Kalau format data di created_date nya sudah benar YYYY-MM-DD maka bisa
juga dengan cara berikut
select ecn_no, subject, apply_date, mydate
from (select ecn_no, subject, apply_date,
to_date(created_date,'YYYY-MM-DD') mydate
from rndp_ecn_master
where 1 = 1
and status = 'COMPLETED') mytab
order by mydate;
Cheers,
Wadi Achmed
dryora wrote:
> Dear All
>
> gue ada sedikit masalah neh....
> mohon pencerahannya...
>
> gue punya query yang didalamnya ada function to_date
>
> select ecn_no, substr(subject,0,95), apply_date,
> to_date(created_date,'YYYY-MM-DD') mydate
> from rndp_ecn_master
> where 1=1
> and status = 'COMPLETED'
> order by mydate
>
> gue juga udah coba ganti *order by mydate* dengan o*rder by
> to_date(created_date,'YYYY-MM-DD')*
>
> kenapa error yah ketika gue order by ?
> Oracle Error :: ORA-01830
>
> date format picture ends before converting entire input string
>
>
> sebagai info : tipe data *created_date* adalah varchar2
>
>
> tp kalo ga di order by, everything is fine
>
>
> Mohon Pencerahannya
>
>
> Makasih
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> --
> -----------I.N.D.O - O.R.A.C.L.E---------------
> Keluar: [email protected]
> Website: http://indooracle.wordpress.com
> http://www.facebook.com/group.php?gid=51973053515
> -----------------------------------------------
>
> Bergabung dengan Indonesia Thin Client User Groups,
> Terminal Server, Citrix, New Moon Caneveral, di:
> http://indo-thin.blogspot.comYahoo! Groups Links
>
>
>
>
>
>
> __________ Information from ESET Smart Security, version of virus signature
> database 3929 (20090311) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
__________ Information from ESET Smart Security, version of virus signature
database 3929 (20090311) __________
The message was checked by ESET Smart Security.
http://www.eset.com