首先,這是什麼樣的表是這樣的:選擇從表中的非唯一的字段,其中數據不包含字符串
Checkpoint
==========
trans_id
checkpoint_id
Checkpoint_Data
===============
checkpoint_id
data
trans_id
不是checkpoint
獨特。 checkpoint_id
對於checkpoint
以及checkpoint_data
是唯一的。 Checkpoint_id
鏈接checkpoint
和checkpoint_data
我想所有的trans_id
從checkpoint
選擇從何處的checkpoint_data
相關data
不包含一些字符串。
我基本上要反轉這種說法:
SELECT ch.trans_id
FROM checkpoint ch,
checkpoint_data chd
WHERE ch.checkpoint_id = chd.checkpoint_id
AND Upper(chd.data)LIKE Upper('%Example String%')
一個簡單的不喜歡沒有工作。
。 TRY'Upper(chd.data)NOT LIKE Upper('%Example String%')' – 2013-02-14 16:13:41
使用NOT不起作用。 trans_id將幾個檢查點和數據鏈接在一起。即使檢查點沒有「示例字符串」,它也很有可能是其他檢查點中的一個,並且該trans_id仍將由選擇返回 – user906153 2013-02-14 16:18:07