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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:50:05+00:00 2026-05-12T18:50:05+00:00

I have a DB that stores different types of tasks and more items in

  • 0

I have a DB that stores different types of tasks and more items in different tables.
In many of these tables (that their structure is different) I need a way to do it that the item has to be double-checked, meaning that the item can’t be ‘saved’ (I mean of course it will be saved) before someone else goes in the program and confirms it.

What should be the right way to say which item is confirmed:

  1. Each of these tables should have a column “IsConfirmed”, then when that guy wants to confirm all the stuff, the program walks thru all the tables and creates a list of the items that are not checked.
  2. There should be a third table that holds the table name and Id of that row that has to be confirmed.
  3. I hope you have a better idea than the two uglies above.
  • 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-12T18:50:05+00:00Added an answer on May 12, 2026 at 6:50 pm

    Is the double-confirmed status something that happens exactly once for an entity? Or can it be rejected and need to go through confirmation again? In the latter case, do you need to keep all of this history? Do you need to keep track of who confirmed each time (e.g. so you don’t have the same person performing both confirmations)?

    The simple case:

    ALTER TABLE dbo.Table ADD ConfirmCount TINYINT NOT NULL DEFAULT 0;
    ALTER TABLE dbo.Table ADD Processed BIT NOT NULL DEFAULT 0;
    

    When the first confirmation:

    UPDATE dbo.Table SET ConfirmCount = 1 WHERE PK = <PK> AND ConfirmCount = 0;
    

    On second confirmation:

    UPDATE dbo.Table SET ConfirmCount = 2 WHERE PK = <PK> AND ConfirmCount = 1;
    

    When rejected:

    UPDATE dbo.Table SET ConfirmCount = 0 WHERE PK = <PK>;
    

    Now obviously your background job can only treat rows where Processed = 0 and ConfirmCount = 2. Then when it has processed that row:

    UPDATE dbo.Table SET Processed = 1 WHERE PK = <PK>;
    

    If you have a more complex scenario than this, please provide more details, including the goals of the double-confirm process.

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

Sidebar

Related Questions

For example, I have three tables that store different types of users with different
I'm writing an application that stores different types of records by user and day.
I have a few different types of companies that can access my web application
I am developing an Android App that stores different types of data in the
I am creating a database for my company that will store many different types
I have several different content type nodes (videos, image galleries, stories...) that I would
I have a table that stores email in 3 diffrent columns name host and
I have multiple classes that will store similar data for different uses and I
I have a stored procedure that does, among other stuff, some inserts in different
I have a table that stores data that has been entered regarding the amount

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.