Loop for my SQL executions

Hi everyone !

I am trying to do a project which has to connect a db, run a specific querry and get product ıd’s from it. After that ı have to execute specific script command for each productıd. But I could not manage to do it.

I have to use this UPDATE script ;

“UPDATE s SET [Description] = REPLACE([Description],N’ENTEGRA Entegrasyon Sistemleri ile Listelenmiştir

FROM [Catalog].[dbo].[Product] s
WHERE s.Id=‘1BB8798B-9CB5-4C1F-2EAA-08DC12F7128F’;”

In summary,

I want to use a variable which can modify the part " WHERE s.Id =’ ID’S WHICH IS INSIDE DT AND HAS TO CHANGE’ "

If ı can make it like this i will use this project to update every Productıd item with loop. Waiting for your answers !


Replace your variable name in the query and it should work.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.