RobHVB6Sql
Programmer
Update does not allow ORDER BY. How can I select the row with the largest Duration -an integer column?
Rob Hasard
(VB6 /SQL 7.0)
Code:
SET ROWCOUNT = 1
UPDATE #contacts
SET Prov1ID = cd.IDCode
FROM tblGContactDetails cd
WHERE cd.contactID = #contacts.ContactID
AND cd.Type = "Provider"
ORDER By cd.Duration DESC -- cant do this!!
-- AND cd.Duration = (SELECT LARGEST(tblGContactDetails.Duration) )
Rob Hasard
(VB6 /SQL 7.0)