TSQL Text Comparison or Update Top 4000 rows of a query
I'm just now learning T-SQL and very familiar to Access trying to move
over to SQL due to leads database size.
I know how to Select the Top 40000 rows, but I don't know how to update a
field in the Query based on that. So I tried to use a Less Than in the
Phone field, but the issue is that the Phone number is a Text Field and
won't work in SQL where it works in Access. Any other ideas?
UPDATE tblLeadsCamp
SET tblLeadsCamp.Subcampaign = @NewName
WHERE ((tblLeads.Phone)>'81455152)' and tblLeads.Resi = 1
From tblLeads INNER JOIN tblLeadsCamp ON tblLeads.Phone = tblLeadsCamp.Phone)
No comments:
Post a Comment