aspose file tools*
The moose likes JDBC and the fly likes changing from MSSQL to MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "changing from MSSQL to MySQL" Watch "changing from MSSQL to MySQL" New topic
Author

changing from MSSQL to MySQL

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
Im switching from MSSQL to MySQL. This is my first time using MySQL. I have to create tables.. stored procedures. However everything I try to copy from MSSQl come up with errors. Can someone point out what is wrong with this stored procedure? What are some of the differences between the two databases that I should keep in mind

CREATE PROCEDURE dbo.ObtainPhotoInfo @photoID varchar(255)
AS
SELECT [ID] , itemDescription, unitprice
FROM itemlist
WHERE [ID] LIKE @photoID
GO
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
What I see is the dbo user, he is MSSQL specific and will not work on MySQL.


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
I tried removing that but i still received errors.

I attempted the following

CREATE PROCEDURE ObtainPhotoInfo (@photoID varchar(255))
AS
SELECT [ID] , itemDescription, unitprice
FROM itemlist
WHERE [ID] LIKE @photoID
GO
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Try to remove GO
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Could you post the error message?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Procedures are defined differently in MySQL - for example you'll have to define an IN and OUT parameter for this procedure. Check the docs - theres a definition of the syntax plus an example in there.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: changing from MSSQL to MySQL