mardi 26 avril 2016

Is there any tool to convert sqlite query to MS-SQL query?

I am porting an already built web app from sqlite to MS-SQL I need to convert following sqlite queries.

1.select strftime('%Y-%m-%d',[CURR_TIMESTAMP])as Curr_Date , CURR_TIMESTAMP,RUNNINGTIME, OPERATINGTIME,CUTTINGTIME,PARTCOUNT from T_STATUS where datetime( Curr_Timestamp ) >='" & dCurrentDate.AddHours(iTimeDuration * -1).ToString("yyyy-MM-dd HH:mm:ss") & "' order by Curr_Timestamp asc

2.select strftime('%Y-%m-%d',[CURR_TIMESTAMP])as Curr_Date , strftime('%H',[CURR_TIMESTAMP])as Curr_H , Min(CURR_TIMESTAMP) as CURR_TIMESTAMP , Min(RUNNINGTIME) as RUNNINGTIME, Min(OPERATINGTIME) as OPERATINGTIME, Min(CUTTINGTIME) as CUTTINGTIME, Min(PARTCOUNT) as PARTCOUNT from T_STATUS where datetime( Curr_Timestamp ) >='" & dCurrentDate.AddHours(iTimeDuration * -1).ToString("yyyy-MM-dd HH:mm:ss") & "' and strftime('%H:%M',[CURR_TIMESTAMP])<>'00:00' group by strftime('%Y-%m-%d',[CURR_TIMESTAMP]), strftime('%H',[CURR_TIMESTAMP])

Aucun commentaire:

Enregistrer un commentaire