As I recall, there is a table that looks like this, and I would like to know the work number that does not contain the string hogehoge or nullnull in the work content.
I can't do it even if I use the sub-query through trial and errorIt looks like the following
Work detail table and work detail table are one-to-many
For example, if one work detail table has three work detail tables, I would like to extract all three work numbers that do not contain hogehoge and nullnull, but I cannot
SELECT Task Number
FROM Task Table INNER JOIN Task Detail Table ON Task Table .ID = Task Detail Table . Task ID
WHERE Task Detail Table .ID IN
(SELECT Task Detail ID)
FROM WORK DETAIL TABLE
WHERE Task Description NOT LIKE '%hogehoge%' AND Task Description NOT LIKE '%null%')
This didn't work either
SELECT distinct Task Number
FROM WORK TABLE, WORK DETAIL TABLE, WORK DETAIL TABLE
WHERE
Task Table .ID = Task Detail Table . Task ID AND
Task Detail Table .ID = Task Detail Table . Task Detail ID AND
NOT (Work Details Table.Work Description LIKE '%hogehoge%'OR
Statement of Work table.Work Description LIKE '%null%')
How can I extract a task number that does not contain a specific string?Please let me know
sql-server
You can exclude the "Work ID" from all "Work ID" that contains the string.
The former is
SELECT ID FROM Worktable
The latter is
SELECT task details table.Task ID
FROM Task Detail Table
INNER JOIN WORK DETAIL TABLE
ON Task Detail Table .ID = Task Detail Table . Task Detail ID
WHERE Task LIKE '%hogehoge%'
OR Task Description LIKE '%null%'
Because you can retrieve it in , you can use the EXCEPT
operator to:
SELECT ID FROM Worktable
EXCEPT
SELECT Task Details Table. Task ID
FROM Task Detail Table
INNER JOIN WORK DETAIL TABLE
ON Task Detail Table .ID = Task Detail Table . Task Detail ID
WHERE Task LIKE '%hogehoge%'
OR Task Description LIKE '%null%'
568 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
577 PHP ssh2_scp_send fails to send files as intended
600 GDB gets version error when attempting to debug with the Presense SDK (IDE)
573 Understanding How to Configure Google API Key
611 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.