Trying to update RadGrid with the following SQL update command along with this sql select statement. The table I am updating to ![]()
has 1 column named "Contactnum" which contains contact #'s and a column "Priority" which lists the Priority as 1,2, or 3. In my update statement, I need to know how to add the Contactnum2 & Contactnum3 and the Priority 2 and 3 to the update statement.
DECLARE @ContactNum NVARCHAR(50)SET @ContactNum = '555-5555 Office'DECLARE @Priority intSET @Priority = 1UPDATE Physician_ContactsSET ContactNum = @ContactNumFrom Physician_Contacts WHERE Priority = @PrioritySELECT A.Phys_Name, E.Specialty, A.Clinic, A.Office_No, A.Residence_No, A.Fax_no, A.Beeper_note, b.ContactNum, c.ContactNum as Contactnum2, d.ContactNum as Contactnum3 FROM PhysicianMainList as A left join Physician_Contacts as B on A.Phys_Staff_ID = B.Phys_Staff_ID and b.priority = 1 left join Physician_Contacts as C on A.Phys_Staff_ID = C.Phys_Staff_ID and c.priority = 2 left join Physician_Contacts as D on A.Phys_Staff_ID = D.Phys_Staff_ID and d.priority = 3 left join WTH_Specialties as E on E.abbr = A.Specialty ORDER BY A.Phys_Name