Hi All
I wonder if someone knows the answer... I have a stored proc that looks similar to the following:
Code:
Update TABLE1
Set
FIELD2 = (SELECT FIELDB FROM TABLE2 WHERE (FIELDA= @PARAM1))
WHERE (FIELD1 = @PARAM1)
The SELECT sub query runs fine when selecting a value from TABLE2 that only appears once but TABLE2 also consists of multiple instance.. it then throws an error.
I think the answer would be to be able to select the FIRST row of the SELECT query result... is this possible in SQL 2K?
Many thanks
Rit