MySQL Forums
Forum List  »  Views

SQL View to MySQL view
Posted by: Robert Du Gaue
Date: February 02, 2015 12:09PM

When I run the WB Migration all my views (and stored procedures) are commented out and not import. I've tried modifying and manually importing a view, but can't seem to get the syntax right. Can someone help me with the MySQL equivalent code of a view and I can probably take it from there. I suspect it's that "*" on line 5, what does mySQL use instead?

Thanks.

--------------
CREATE OR REPLACE VIEW dbo.vw_PIFS

AS

SELECT TOP (100) PERCENT p.LastName, p.FirstName, l.Description, c.StartDate, c.EndDate, c.BasePrice * c.NumMonths AS ProgramCost, c.BasePrice,

c.NumMonths

FROM dbo.tbl_ContractAgreements AS c INNER JOIN

dbo.tbl_Students AS s ON c.StudentID = s.StudentID INNER JOIN

dbo.tbl_Persons AS p ON s.PersonID = p.PersonID INNER JOIN

dbo.tbl_Location AS l ON c.LocationID = l.LocationID

WHERE (c.PaymentPlanID = 1) AND (c.AgreementStatusID IN (3, 6, 9, 10))

ORDER BY l.Description, p.LastName, p.FirstName



;

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'p.LastName, p.FirstName, l.Description, c.StartDate, c.EndDate, c.BasePrice * c.' at line 5

Options: ReplyQuote


Subject
Views
Written By
Posted
SQL View to MySQL view
5619
February 02, 2015 12:09PM
1702
February 02, 2015 01:26PM


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.