Results 1 to 2 of 2

Thread: Help in migrating MS SQL Server Stored Procedure to MySQL

  1. #1
    Join Date
    Feb 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help in migrating MS SQL Server Stored Procedure to MySQL

    Hi Erik,

    I am a beginner to MySQL.
    I have to convert few MS SQL Stored procedures to MySQL as we are converting the DB to MySQL.

    One of my Stored Procedure to be converted to MySQL is as follows:

    CREATE PROCEDURE dpr_ApplyNetLock
    @LockType int,
    @uuid char(50),
    @SeatLimit int,
    @appid int,
    @ComputerName char(80),
    @username char(80)
    AS

    declare @rows int

    if @lockType = 16
    begin

    insert into BPNETMLock (Entry_Type, Unique_ID, ComputerName, UserName,
    ApplicationType, ProcessID, login_time) select @LockType, @uuid, @ComputerName,
    @username, @appid, @@spid, login_time from master..sysprocesses where spid = @@spid and
    (select count(*) from BPNETMLock where Entry_Type = @LockType and
    ApplicationType = @appid ) < @SeatLimit

    select @rows = @@ROWCOUNT
    if @rows = 0 return 1000
    return 1
    end
    return 1000
    GO



    Can someone please help me in converting this. I have a few more to convert but if someone can help me with the above one I would try for the other.

    Thank you so much in advance.

    Regards,

    Uday

  2. #2
    Join Date
    May 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Uday,

    Am too having same query, please let me know if you got the answer.
    looking forward to your reply.

    Thanks,
    Manohar

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •