Results 1 to 3 of 3

Thread: Insert statement

  1. #1
    Join Date
    Dec 2011
    Posts
    2

    Insert statement

    I need to insert values into two different tables in different database.

    This Store procedure is in Database1,

    INSERT INTO [DataBase1].[dbo].[UserMaster]
    (UserFirstName,UserLastName,[Login],[Password],Phone,Email,SecondaryEmail) VALUES
    (@UserFirstName,@Userlastname,@Login,@Password,@Ph one,@Email,@SecEmail)


    INSERT INTO [DataBase2].[dbo].[UserMaster]
    ([Login],Pswd) VALUES
    (@Login,@Password)

    I am not able to insert in DataBase2.
    I am not sure where am I wrong.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    What kind of permission do you have in db2?

  3. #3
    Join Date
    Dec 2011
    Posts
    2
    I solved it myself. It was in sp_adduser. I changed the procedure name and it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •