Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4626424
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:25:06+00:00 2026-05-22T03:25:06+00:00

I need to transfer users info from the live DB to its new home

  • 0

I need to transfer users info from the live DB to its new home (which was created via a backup of the live DB so Im only looking to port new users across.(running sql sqerver 2005)

I can Transfer the aspnet_ tables without any issue

However when I try to do the users table it errors with:

Msg 512, Level 16, State 1, Procedure Mailing_list, Line 18
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

Query

begin TRAN
SET IDENTITY_INSERT TargetDB.dbo.users ON

INSERT INTO TargetDB.dbo.users (UserId, UserName, FirstName, LastName, IsSuperUser,
                                AffiliateId, Email, DisplayName, UpdatePassword)
(SELECT dnnu.UserId, dnnu.username, dnnu.firstname, dnnu.lastname, 
        dnnu.isSuperuser, dnnu.AffiliateId, dnnu.Email, dnnu.DisplayName, 
        dnnu.UpdatePassword
FROM LiveDB.dbo.users dnnu
    INNER JOIN LiveDB.dbo.aspnet_users u
        ON (dnnu.username = u.username)

WHERE dnnu.username NOT IN (SELECT username
                            FROM TargetDB.dbo.users))

SET IDENTITY_INSERT TargetDB.dbo.users OFF
commit TRAN

I have also run this same section of code on at least two other Database with no issues

Any help would be greatly appreciated

Thanks in advance
Matt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:25:06+00:00Added an answer on May 22, 2026 at 3:25 am

    After spending an hour or two yesturday staring at this issue and deciding to ask the question I took a second glance and it hit me.

    There was a trigger on the table for insert/update and it was throwing a wobbly dropped it ran the query and it now works

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What data base tables do I need to copy to transfer all users from
I wanted to develop an Android application which allows users to transfer files from
I need to transfer a user to a page which requires session data which
I need to transfer data daily from SQL Server (2008) to SQL Server (2005).
I need to monitor the data transfer of a program (Unity3D). I'm looking for
I need to select User Name from the collection of Users. I do it
I have an MVC3 web app via which users upload text files to the
System A captures X information from users via UI. This information is validated and
I need to transfer binary files from my pc/mac to my app. I want
I need to transfer packets through the internet whose length should be dynamic. struct

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.