以下查询产生 6 个结果:
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
我修改了DELETED
一行上的列,将其从 更改False
为True
。当我尝试搜索DELETED = 1
而不是 时DELETED = 0
,搜索不会产生任何结果。
为什么我更改的那一行没有出现?DELETED = 0
运行查询时(上图),我只得到 5 个结果。在我专门搜索它之前,不会检索到第 6 个结果ATTACHMENT_ID
。
谢谢你的帮助。