Hi,
I have a table with various columns one of which has a code in it which is not unique. I would like to flag each time this value changes to make it easier to spot. i.e.
name code
jon 1234
dave 1234
sue 1234
martin 2345
alan 2345
gary 8910
jeff 8910
to
name code flag
jon 1234 X
dave 1234
sue 1234
martin 2345 X
alan 2345
gary 8910 X
jeff 8910
My first idea was to do a select distinct by code field then update the flag field for those values only but I can't get this to work?
Thanks, Mark.
I have a table with various columns one of which has a code in it which is not unique. I would like to flag each time this value changes to make it easier to spot. i.e.
name code
jon 1234
dave 1234
sue 1234
martin 2345
alan 2345
gary 8910
jeff 8910
to
name code flag
jon 1234 X
dave 1234
sue 1234
martin 2345 X
alan 2345
gary 8910 X
jeff 8910
My first idea was to do a select distinct by code field then update the flag field for those values only but I can't get this to work?
Thanks, Mark.