Cleaning Flashcards
Cleaning
1
Q
Records where x is the same as y
A
Select Count (*) From (…) Where x=y
2
Q
Records where x is blank
A
Select Count(*) From (…) Where x is null
3
Q
Records where there are duplicate copies of x
A
Select x, count() From(…) Group by x Having Count () > 1
4
Q
Update an incorrect value of an attribute
A
Update (…) Set attribute1 = ‘…’ where attribute2 = ‘…’
5
Q
Check if there are illegal invalid entries
A
Select * from (…) where x not in (select x from (…))
6
Q
is empty, is not within and is similar to
A
aaa like ‘xxx%’ and aaa not in and aaa is null