Jump to content
Fórum Script Brasil
  • 0

Converter MySQL para MSSQL


luisiduarte

Question

Boa tarde pessoal,

Não tenho grande experiencia em DataBase e me deparei com a seguinte situação, tenho scripts prontas para MySQL mas meu database é MSSQL, portanto pergunto se existe alguma ferramenta para converter MySQL para MSSQL ?

Abaixo um exemplo do que tenho em MySQL:

-----------------------

DROP FUNCTION IF EXISTS cck.fn_cck_Constante $$

CREATE DEFINER=`root`@`localhost` FUNCTION `fn_cck_Constante`(dtData DATETIME, nCampoMemoria INT) RETURNS double

BEGIN

DECLARE dbSaida DOUBLE;

DECLARE nIdConstante INT;

SET nIdConstante = fn_cck_IdConstante(dtData, nCampoMemoria);

SELECT IF(nIdConstante > 0,

(SELECT constante FROM constante WHERE id_constante = nIdConstante AND id_campo_memoria = nCampoMemoria),

0) INTO dbSaida;

RETURN dbSaida;

END $$

DELIMITER ;

--------------------

Grato

Att

Luis Duarte

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...