Hi, I am new to using mysql and there isn't any tutorials online on that shows how to create mysql stored procedure for paging purposes. Thus, I read tutorials on creating stored proc that were written for use with SQL Server. I just need to be shown how to convert the syntax to one that is compatible with MySQL. The following is the stored proc written for SQL Server, please show me how to convert to a MySQL compatible syntax. Thank you in advance for your help.
[CODE=sql]CREATE PROCEDURE uspPaging
@nStartValue INT,
@nEndValue INT
AS
SET NOCOUNT ON
DECLARE @tblTempData TABLE
(
NumID INT IDENTITY,
ResID INT,
ResType VARCHAR(50),
ResDoc Blob
)
INSERT INTO @tblTempData
(
NumID,
ResID,
ResType,
ResDoc,
Firstn,
Lastn
)
SELECT
ResumeID,
DocDate,
Resumes,
DocType,
FirstName,
LastName,
DocDate
FROM ResumeDB
where Make = '" & LBoxProfessions .Items(i).Text & "'"
SELECT EmployeeID,
ResID,
ResType,
ResDoc,
Firstn,
Lastn
FROM @tblTempData
WHERE nID BETWEEN @nStartValue AND @nEndValue
ORDER BY
nID ASC[/CODE]
[CODE=sql]CREATE PROCEDURE uspPaging
@nStartValue INT,
@nEndValue INT
AS
SET NOCOUNT ON
DECLARE @tblTempData TABLE
(
NumID INT IDENTITY,
ResID INT,
ResType VARCHAR(50),
ResDoc Blob
)
INSERT INTO @tblTempData
(
NumID,
ResID,
ResType,
ResDoc,
Firstn,
Lastn
)
SELECT
ResumeID,
DocDate,
Resumes,
DocType,
FirstName,
LastName,
DocDate
FROM ResumeDB
where Make = '" & LBoxProfessions .Items(i).Text & "'"
SELECT EmployeeID,
ResID,
ResType,
ResDoc,
Firstn,
Lastn
FROM @tblTempData
WHERE nID BETWEEN @nStartValue AND @nEndValue
ORDER BY
nID ASC[/CODE]
Comment