MySQL Forums
Forum List  »  Stored Procedures

Converting Functions from MSSQL to MYSQL
Posted by: M B
Date: November 22, 2011 12:32PM

Hello,

I've been working on converting functions in MSSQL to MYSQL and I've run into a bit of a issue. Below is my current function code for MYSQL that I've converted from MSSSQL. I may be looking at this in the wrong way..Can any provide me any insight on what I'm doing wrong. I'm currently getting a syntax error after RETURN.


DELIMITER
ALTER FUNCTION dbo.qfSo

RETURN SELECT tblServiceOrder.AccountNumber, tblServiceOrder.DateBilled, tblServiceOrder.AmountDue, tblServiceOrder.Balance,
tblServiceOrder.SoNumber, DATEDIFF(d, tblServiceOrder.DateBilled, ISNULL(tblServiceOrder.DatePaid, vNow.Now)) AS PayRate,
tblServiceOrder.DatePaid, vNow.Now
FROM dtblServiceOrder CROSS JOIN
vNow

Thank you in advance for your help.

Options: ReplyQuote


Subject
Views
Written By
Posted
Converting Functions from MSSQL to MYSQL
2178
M B
November 22, 2011 12:32PM
743
M B
November 22, 2011 01:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.