Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Need a procedure to update a table

Author  Topic 

sunsanvin
Master Smack Fu Yak Hacker

1274 Posts

Posted - 2010-04-21 : 17:07:45
Hi Experts,
i have a table with application contact details. it has around 4000 applicationID's. i need to update offshore primary and secondary based on application ID. for each application, onsite primary is different and secondary is different. around 20 onsite primary and secondary are there.
******i need the logic like the below***
if A is onsite_primary then X is offshore_primary where appId=1022
if B is onsite_secondary then Y is offshore_secondary where appId=1022
application ID'as are around 4000. (may be need to give as parameter to proc)

***** I can write the query as beow, but need to check the excel sheet who is primary and who is secondary fro each.****
any help.......

update dbo.Apptbl set Con_name='vinod' where application_id=2345 and Con_Type='offshore_PrimaryDBA'
update dbo.Apptbl set Con_name='kumar' where application_id=2345 and Con_Type='offshore_secondaryDBA'


Arnav
Even you learn 1%, Learn it with 100% confidence.
   

- Advertisement -