sql server 2012 - TSQL Text Comparison or Update Top 4000 rows of a query -


i'm learning t-sql , familiar access trying move on sql due leads database size.

i know how select top 40000 rows, don't know how update field in query based on that. tried use less in phone field, issue phone number text field , won't work in sql works in access. other ideas?

update tblleadscamp  set tblleadscamp.subcampaign = @newname ((tblleads.phone)>'81455152') , tblleads.resi = 1 tblleads inner join tblleadscamp on tblleads.phone = tblleadscamp.phone) 

to update top 4000 records can

  update top(4000) tblleadscamp set subcampaign = @newname  

or

using method -

 update tblleadscamp  set tblleadscamp.subcampaign = @newname tblleads inner join tblleadscamp on tblleads.phone = tblleadscamp.phone cast(cast(tblleads.phone varchar(10)) int) > 81455152 , tblleads.resi = 1 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -