U
U
ummahusla2015-08-10 12:01:14
MySQL
ummahusla, 2015-08-10 12:01:14

CodeIngiter how to convert query to mssql query?

Good afternoon, we switched from Oracle to MS db, and now we need to rewrite all queries for one application, that's what happened and what needs to be converted to mssql. I feel like a loshka, because it seems like an elementary query that I can’t build myself.
$result = $this->db->query("SELECT A.*, LOL.FOLLOWUP_STATUS(COMM_COMMUNICATIONID) AS FOLLOWUP_STATUS FROM (SELECT LOL2COMMUNICATION.* FROM LOL2COMMUNICATION WHERE CMLI_CREATEDBY = $user_id AND COMM_ACTION IN ('LOL3_PHONE','LOL3_EMAIL' ,'LOL3_MEETING') ORDER BY COMM_DATETIME DESC) A WHERE ROWNUM <= 1337")->result();
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
evnuh, 2015-08-10
@evnuh

The loser is the one who took cms and did not use the query builder. Rewrite everything to the query builder so that later the transition to another DBMS is just a replacement of a line in the config. rather than rewriting queries.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question