SQL Server
Monday, January 2, 2012
Time Sorting if AM and PM Charaters are Exist
select
data
,
data_id
from
master_data
where
master_id
=
9
and
active
=
1
order
by
(
substring
(
data
,
charindex
(
''
,
data
)+
1
,
len
(
data
))),
data
Output :
07-12 AM
09-10 AM
01-03 PM
03-05 PM
05-07 PM
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment