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

  • Home
  • SEARCH
  • 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 8560383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:15:50+00:00 2026-06-11T16:15:50+00:00

I have 5000 records, two fields of which contain Categories and SubCategories . There

  • 0

I have 5000 records, two fields of which contain Categories and SubCategories. There are only a (small) finite number of possible values. These are kept in tblCategory, tblSubCategory, they are not linked (and do not need to be). Note that the Categories/SubCategories in the main table do change frequently.

I want to add a flag in my view that checks if the categories/subcategories in each record are valid by checking the contents of the table. The Categories/SubCategory tables will rarely change.

I just want something similar to CASE WHEN tblRecords.Category is in tblCategory.Category THEN 0 ELSE 1 END AS errCategory

How can I achieve this?

  • 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-11T16:15:52+00:00Added an answer on June 11, 2026 at 4:15 pm

    Try this:

    CASE WHEN (SELECT COUNT(Category) 
            FROM tblCategory WHERE 
           tblCategory.Category = tblRecords.Category) > 0 
    THEN 0 ELSE 1 END AS errCategory
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grid with over 5000 data records. This data keeps growing on
Lets say I have multiple commands like 5000 which updates some column and row
I have a large 100mb file which I would like to perform about 5000
Assuming I have a collection in MongoDB with 5000 records, each containing something similar
Possible Duplicate: Rails: select unique values from a column Lets say I have 5000
I have two tables. Table1->Payment AdmissionNum(PK) | StudName | Fees | 1 sagar 5000
I have a table of 5000 records with a date column. How do I
I am building an iPhone application .In the database I have 5000 records. Among
I have a datatable with approx. 5000 records and put it in a dataset/datatable
I have two tables. One which holds the user status content and the other

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.