Hi,
I am having a issue I need to loop through a series of records and update it on sql server however I am unsure how the looping is going to work
This is sequence of which I need to update the data
select distinct item_number, item_description from [dbo].[temp_InvoiceItems]
where item_number is null
or item_number = ‘’
or item_number = ‘NULL’
select distinct item_number
from [dbo].[temp_InvoiceItems]
where item_description = ‘10:1 MEAT’ (This is one item from the description however there is many)
and item_number is not null
and item_number <> ‘’
and item_number <> ‘NULL’
select * from [dbo].[temp_InvoiceItems]
where item_description = ‘10:1 MEAT’
and item_number = ‘NULL’
update [dbo].[temp_InvoiceItems]
set item_number = ‘5305’
where invoice_no = ‘INV000551198’
and item_description = ‘10:1 MEAT’
I have tried to find a way however I am unsure how I can loop through this for each record?