Hi All,
I have about 85 tables that need to have the same query run on them.
I can set up each query manualy but, this does take alot of time and if something is wrong.......
The Query is :
Update dbo.Customer0001 SET REF =
CASE LEFT(ORDER, 7)
WHEN '123123' THEN 23 + RIGHT(ORDER,2)
WHEN '123185' THEN 24 + RIGHT(ORDER,2)
END
WHERE NAME = 'Harvard'
So I need to run the same query on tables Customer0002, Customer0003, Customer0002, Customer0004 ......... Customer0085 ...etc....
I thought about having a loop running in 'Local Packages' but have no idea how to set up the loop.
Thanks for reading this and looking foward to awarding many stars for your help....
I have about 85 tables that need to have the same query run on them.
I can set up each query manualy but, this does take alot of time and if something is wrong.......
The Query is :
Update dbo.Customer0001 SET REF =
CASE LEFT(ORDER, 7)
WHEN '123123' THEN 23 + RIGHT(ORDER,2)
WHEN '123185' THEN 24 + RIGHT(ORDER,2)
END
WHERE NAME = 'Harvard'
So I need to run the same query on tables Customer0002, Customer0003, Customer0002, Customer0004 ......... Customer0085 ...etc....
I thought about having a loop running in 'Local Packages' but have no idea how to set up the loop.
Thanks for reading this and looking foward to awarding many stars for your help....