MySQL Forums
Forum List  »  Microsoft SQL Server

SQL Server Query from Mysql Query
Posted by: Diego Porfirio
Date: May 25, 2012 12:21PM

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.

Options: ReplyQuote


Subject
Written By
Posted
SQL Server Query from Mysql Query
May 25, 2012 12:21PM


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.