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 |
|
Crespo
85 Posts |
Posted - 2002-10-31 : 07:47:22
|
| UPDATE AVCISET AVC_SOURCE = (SELECT A.AVC_SOURCE FROM (SELECT DISTINCT MEMBER_KEY, AVC_SOURCE, CONTRIBUTION_TYPE FROM AVC AS A INNER JOIN AVCI_AMMAR) AS B ON A.MEMBER_KEY = B.MEMBER_KEY) C WHERE AVCI.MEMBER_KEY = C.MEMBER_KEY)Why doesn't this work?!Best Regards.Crespo.Hewitt Bacon & WoodrowEpsomSurreyUnited Kingdom |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-10-31 : 08:00:58
|
| You have FROM AVC AS A INNER JOIN AVCI_AMMARwith no join fields which is invalid.Use cross join instead of inner join if that is really what you want.Suggest you look at what you are trying to do though.Did you know that you can do an update viaupdate tblset fld = fldfrom tbl t1inner join tbl2 t2on ...==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Crespo
85 Posts |
Posted - 2002-10-31 : 08:15:10
|
Thanks for your answer,I can not believe I did not spot that stupid error. Oops! Yea I know how to do updates but for what I am trying to do it is not that easy I'm afraid.Cheers big ears. Best Regards.Crespo.Hewitt Bacon & WoodrowEpsomSurreyUnited Kingdom |
 |
|
|
|
|
|