MySQL Forums
Forum List  »  Microsoft SQL Server

Query SQL Server to MySql
Posted by: Diego Porfirio
Date: January 27, 2012 03:18AM

Hi,

I need help for transform the SQL Server Query from Mysql Query.

This is my query:

-------------------------------------------------------------------------------
"
DECLARE @em varchar(100) SET @em = ?
DECLARE @ident int SET @ident = (SELECT u.id_user FROM User u WHERE email = @em)
DECLARE @apel varchar(100) SET @apel = (SELECT u.apel FROM User u WHERE email = @em)
SELECT u.email, p.permission
FROM User u, user_permission p
WHERE u.id_user = p.User
AND u.email = @em;
UPDATE User SET LastAccess =GETDATE()
WHERE email = @em;
INSERT INTO Access VALUES(@apel, GETDATE(), @ident);
UPDATE User SET access= (access +1) WHERE email = @em;
"
--------------------------------------------------------------------------------

I would be grateful for those who help me because I tried and not found the solution.

Thanks.

Options: ReplyQuote


Subject
Written By
Posted
Query SQL Server to MySql
January 27, 2012 03:18AM


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.