1
Reply

Convert Select into update

Petro Tiburcio

Petro Tiburcio

May 16 2013 9:35 AM
1k
is there any way to convert this into SELECt query to UPDATE?

SELECT p.pId, p.Lname, p.Fname, i.pId, i.iId, i.fatherID, i.motherID, i.DateOfBirth, i.Address,     (SELECT sp.Fname+' '+sp.Lname FROM Profile sp WHERE sp.pId=i.pId) AS child,     (SELECT sp.Fname+' '+sp.Lname FROM Profile sp WHERE sp.pId=i.fatherID) AS father,     (SELECT sp.Fname+' '+sp.Lname FROM Profile sp WHERE sp.pId=i.motherID) AS mother         FROM Info i             INNER JOIN Profile p                 ON p.pId=i.pId
but code above is used within ASP, what I need for now is to convert that into UPDATE which will I use inside my c# code, which I need to declare variables such as @pid, @lname...please help me...Thanks and Godbless

Answers (1)