Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
uniquegodwin
Starting Member
12 Posts |
Posted - 2006-02-08 : 03:10:47
|
| Please help me with this...Here is the query I tried and it says subquery cannot give more than 1 value.So what do I do for it? How do i shape this query to work?Thanks a millionFollowing is the query...UPDATE tblLeadActivitiesSET f_activityName = (SELECT f_activityName FROM tblStandardActivities)WHERE (f_leadId = '0602HOUS3') |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-02-08 : 03:13:42
|
This is becuase this (SELECT f_activityName FROM tblStandardActivities) returns more than 1 value.Use this syntax.UPDATE U set U.col1 = T.col1 FROM table1 U inner join table2 T ON U.pk = T.pk ----------------------------------'KH' |
 |
|
|
uniquegodwin
Starting Member
12 Posts |
Posted - 2006-02-08 : 03:27:24
|
| Hi,Im new to this database thing...Im not sure how to substitute in that template you've given me.....please help me with that too if possible...Please dont mind..Im sorry for asking so much.Thanks |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-02-08 : 03:33:17
|
| UPDATE LSET f_activityName =S.f_activityName from tblLeadActivities L inner join tblStandardActivities Son L.f_activityName=S.f_activityName WHERE S.f_leadId = '0602HOUS3'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|