how can we convert prepare satament of mysql into mssql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akbarmahrat
    New Member
    • Nov 2008
    • 2

    how can we convert prepare satament of mysql into mssql

    i want to convert this mysql code into mssql.

    SET strSTMTDEFINATI ON = Concat(SUBSTRIN G(strSTMTDEFINA TION,1,LENGTH(s trSTMTDEFINATIO N) -1),");");



    SET @myCREATE := strSTMTDEFINATI ON;
    PREPARE stmt FROM @myCREATE;
    EXECUTE stmt;
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Just use EXEC (@statement_var iable) directly. You don't need to prepare the statement, but you have to build the dynamic query string.


    -- CK

    Comment

    • akbarmahrat
      New Member
      • Nov 2008
      • 2

      #3
      Originally posted by ck9663
      Just use EXEC (@statement_var iable) directly. You don't need to prepare the statement, but you have to build the dynamic query string.


      -- CK
      its working fine . thanks for ur guideline.

      Comment

      Working...