I have a table such as:
PK_ID LOCATION_ID LOCATION_TEXT
1 21 NULL
2 44 NULL
3 26 NULL
I have a function that returns the LOCATION_TEXT from the LOCATION_ID. I am trying to do something like:
update mytable
set locationText = (select dbo.fcGetLocationText (LOCATION_ID) from mytable)
I am getting the
Subquery returned more than 1 value
error, which I kind of understand, but I don’t know how else to do this… how can I update the LOCATION_TEXT column without a cursor or while loop?
Why not simply:
Also why are your column names yelling?