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 8503261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:42:36+00:00 2026-06-11T01:42:36+00:00

I’m trying to develop a SQL query to help me extract some data from

  • 0

I’m trying to develop a SQL query to help me extract some data from my ASP.NET based website. I’m working on a SQL compact database (sdf) on my ASP.NET based website using WebMatrix.

I’m trying to implement a code in my website to do monthly spring cleaning of the database. I need to delete those accounts which were created by the user but never activated. So to free up the user IDs and manage database size, I thought I’d run a query on the database to get me those accounts which have not been confirmed by the user yet and their creation date has passed 20 days.

The database structure is that my user’s table is called “Users”. It has a UserID (autonumber), Email, FullName, etc. fields.

The table created by ASP’s WebSecurity is called “webpages_Membership”. It has UserID (autonumber), CreationDate, IsConfirmed (whether account has been activated), etc. fields.

I’m not good at developing SQL queries. The problem I’m facing is that when a user is deleted using the Membership.DeleteUser method with argument set to DeleteAllRecords, it deletes the relevant user’s row in my Users table, whereas it does nothing in its own table “webpages_Membership”. When a user tries to sign-in, it simply checks if the Email (the userid) exists in my Users table. So in the long run, there are accounts appearing in “webpages_Membership” which do not exist in “Users” table because they were deleted. People who are familiar with the behavior of WbeSecurity must’ve experienced all this above.

I’m trying to develop a query that will lookup the “webpages_Membership” table, get me those rows which have IsConfirmed field set to False (meaning those accounts not activated yet), and ensure that the UserID field in “webpages_Membership” also exists in “Users” table (this will ensure account is not previously deleted).

  • 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-06-11T01:42:37+00:00Added an answer on June 11, 2026 at 1:42 am
    select wm.* from webpages_Membership wm inner join Users u
    on wm.UserID = u.UserID 
    Where wm.IsConfirmed = 'false'
    and DATEADD(dd,20,wm.CreationDate) <= getdate()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to develop a c#/asp.net application to extract data from a SQL server
Im trying to develop my first ASP.NET MVC web app and have run into
I am trying to develop a BlackBerry application that will show data from an
I'm totally rewriting the question.. I'm new to ASP.Net, and trying to develop a
I am trying to develop a T-SQL query which will do the following: ROUND(100
I am a New ASP.NET Developer and I am trying to develop a simple
I'm trying to develop an ASP SQL connection to a MSSQL 2005 server. The
I am trying to develop a T-SQL stored procedure and perform some logic and
I am trying develop a basic referrer system to my Django website, system will
I am trying to develop the XMPP Gateway which can send/receive from standard XMPP

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.