Pardon me if I’m asking this, but I’m not a SQL Server nor SQL developer.
i have a CSV that i import into a table let’s call it T that i create on the fly in SQL Server 2005.
what i would like to do is to run some queries against other tables based on the data imported into the table T i created.
example :
select *
from TableX
where customerID = [this should contain the customerID from the table T]
and then if i find it, i need to update the same table T, if not i move along… until the last record in that csv file. Any idea will be appreciated.
No loop necesary for what you want, it seems that you only need
IN:If you need to update
TableXwith some mark if exists onTableT, it should be:If you need to update
TableXwith some value fromTableT, it should be something like this: