HestonJames
Programmer
This has to be the simplest query I've not been able to get working, I hang my head on this and hope you wont judge me ;-)
I have this query:
Now, this is meant to remove all records from ThinkTankGroup table which are not referenced from the ThinkTank table, however, it doesn't ever seem to delete anything :-s
So, for instance, if:
returns a list like this:
1
NULL
NULL
NULL
1
1
1
NULL
1
NULL
Then running that first query wont delete rows with a ThinkTankGroup_ID of 3 or 4 or 5 etc, when in my mind, it should!??
Any ideas guys? I feel like a dork for asking but its gotten me confused and angry this morning
Heston
I have this query:
Code:
Delete From ThinkTankGroup
Where ThinkTankGroup_ID Not In (
Select ThinkTankGroup_ID
From ThinkTank
)
Now, this is meant to remove all records from ThinkTankGroup table which are not referenced from the ThinkTank table, however, it doesn't ever seem to delete anything :-s
So, for instance, if:
Code:
Select ThinkTankGroup_ID
From ThinkTank
returns a list like this:
1
NULL
NULL
NULL
1
1
1
NULL
1
NULL
Then running that first query wont delete rows with a ThinkTankGroup_ID of 3 or 4 or 5 etc, when in my mind, it should!??
Any ideas guys? I feel like a dork for asking but its gotten me confused and angry this morning
Heston