Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How To Import SQL File To SQL Server??

Author  Topic 

joola
Starting Member

2 Posts

Posted - 2008-06-04 : 03:09:16
Hi,

I have a file reg.sql how can I import that file to SQL Server??Can anyone tell me the step??

Thanks

Mbeeee...

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-04 : 03:42:28
reg.sql? What does that contain? Is it file containing sql code?
Go to Top of Page

joola
Starting Member

2 Posts

Posted - 2008-06-04 : 04:12:48
Yes...it`s look like this :

CREATE PROCEDURE Register_User
(
@UserName Varchar( 50 ),
@PassWord Varchar( 50 ),
@FirstName Varchar( 50 ),
@LastName Varchar( 50)
)
AS

IF EXISTS( SELECT u_ID
FROM User_ID
WHERE u_UserName=@UserName )
RETURN - 1
ELSE
INSERT User_ID (
u_UserName,
u_PassWord,
u_FirstName,
u_LastName
) VALUES (
@UserName,
@PassWord,
@FirstName,
@LastName
)
RETURN @@IDENTITY
GO



Mbeeee...
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-04 : 05:23:43
You mean executing this? You could just open it from editor on management studio and execute it. DIdnt understand what you mean by importing??
Go to Top of Page
   

- Advertisement -