Running a SQL query from specific month in SAP DB

SAPMySQLDatabase

When your T0.name is char filed, you should replace Order By as below −

order by
case when cast(left (T0.Name,2) as int)>=8
   then cast(left (T0.Name,2) as int)-8
   else cast(left (T0.Name,2) as int)+4
 end
raja
Published on 19-Dec-2017 11:32:24
Advertisements