Oracle Concat and select substring

select no_sppd
from sppd_ttrs_sppd
ORDER BY concat(concat(SUBSTR(no_sppd,18,4),SUBSTR(no_sppd,6,2)),substr(no_sppd, 1, 4)) DESC

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: