Monday, 29 February 2016

Updating a record

SELECT TOP 1000 [Index]
,[Action]
,[AcNumber]
,[FromNumber]
,[CustomerCode]
,[PolicyCode]
,[FromCode]
,[Amount]
,[EntryDate]
,[EntryTime]
,[RegNo]
,[Status]
,[FromDate]
,[ToDate]
,[SumInsured]
,[Branch]

FROM [SQLDB].[dbo].[Customers]
where Code='Profilenumber'
order by [Index] desc


  • Update the record:
UPDATE [SQLDB].[dbo].[Customers]
SET [OldCustomer] = '0'
,[password]=''
WHERE Code='Profilenumber'
GO