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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:04:30+00:00 2026-06-17T09:04:30+00:00

The following query yields 6 results: SELECT ATTACHMENT_ID, /* Somme other columns */ THUMBNAIL_EXIST,

  • 0

The following query yields 6 results:

SELECT ATTACHMENT_ID,
       /* Somme other columns */
       THUMBNAIL_EXIST,
       CASE isnull ((SELECT TOP 1 EMAIL_ID
                     FROM   EMAILS_ATTACHMENTS
                     WHERE  ATTACHMENT_ID = vwFILES_ATTACHMENTS.ATTACHMENT_ID), '00000000-0000-0000-0000-000000000000')
         WHEN '00000000-0000-0000-0000-000000000000' THEN '0'
         ELSE '1'
       END AS SENT_ATTACHMENT,
       CASE File_ext
         WHEN '.pdf' THEN 'true'
         ELSE 'false'
       END AS 'enablecheck',
       CASE VISIBLE_TO_CLIENT
         WHEN '1' THEN '/FACTS/App_Themes/SugarClassic/images/check_inline.gif'
         ELSE '/FACTS/App_Themes/SugarClassic/images/close_inline.gif'
       END AS 'VISIBLE_TO_CLIENT_PATH'
FROM   vwFILES_ATTACHMENTS
WHERE  ( 1 = 1 )
       AND ( PARENT_TYPE = 'Files' )
       AND ( PARENT_ID = '55e52006-ce85-4781-b6f9-00b68c04d62f' )
       AND ( DELETED = 0 )
ORDER  BY DATE_ENTERED DESC 

I modified the DELETED column on one row changing it from False to True. When I try to search for DELETED = 1 instead of DELETED = 0, the search yields no results.

Why is the one row that I changed not showing up? I only get 5 results when I run my DELETED = 0 query (above). The 6th result is not retrieved until I search specifically for it’s ATTACHMENT_ID.

Thanks for your help.

  • 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-17T09:04:30+00:00Added an answer on June 17, 2026 at 9:04 am

    It’s hard to determine what’s going on with your situation given the post and the comments. I would try something like this to determine your Deleted column values:

    SELECT DELETED, COUNT(*)
    FROM vwFILES_ATTACHMENTS
    GROUP BY DELETED
    

    If that is returning you the correct results, then as dumb as it sounds, assuming Deleted = 1 does not work, try something like:

    SELECT * 
    FROM vwFILES_ATTACHMENTS
    WHERE Deleted <> 0
    

    If either = 1 or <> 0 work and return the correct row, then chances are @Joel was correct with his assumptions that other constraints in your WHERE clause are causing it not to return. If = 1 or <> 0 do not work, then I’m clueless.

    Good luck.

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

Sidebar

Related Questions

The following query: select unnest(Table2.L) as X, unnest(Table1.O) from Table1, Table2 where Table1.code =
The following query: SELECT DISTINCT ClassName FROM SiteTree ORDER BY ClassName is returning things
I'm doing the following in a custom function: $exists = $wpdb->query($wpdb->prepare(' SELECT COUNT(*) FROM
I have a SELECT query that yields multiple results and do not have any
I have the following query: SELECT c.danhoEstetico, c.danhoDirecto FROM conceptos c INNER JOIN materialesconceptos
The following query gives me a one row result Select Sum(Actions) From ( Select
I have the following queries: 1 SELECT TOP 1 CASE WHEN latency=-1 THEN 'Down'
The following query is taking more than 25 seconds to complete: SELECT c.* ,
The following query matches the ID of electors with the corresponding elector from voting
Following query is taking really long to execute: SELECT HISTORY.VERSION_ID , HISTORY.ACTION , HISTORY.STATUS

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.