Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Column but it is there. 1

Status
Not open for further replies.

craigward

Programmer
Nov 13, 2007
230
0
0
GB
Hi There,

I have been running the following query and it has been working fine. Today I ran it and I get an error: Invalid Column name 'Duplicate_Record'. That column does exist and if I do select duplicate_record from wce_contact I get no error. I have clear the cache but that did nothing, any ideas would be very helpful thanks.

Code:
update dt
set Duplicate_Record = '1'
from
(select row_number() over (partition by emailaddress order by uniqueid) as rnum, emailaddress from wce_contact where Duplicate_Record is null) dt
where rnum > 1
 
I would be surprised, if that ever worked.

You want to update wce_contact.Duplicate_Record, but your update commands to update dt, which only has columns rnum and emailaddress.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top