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 |
|
RussB17
Starting Member
4 Posts |
Posted - 2003-12-30 : 11:47:12
|
| Whats wrong with this t-sql statement? Will this not work?I want to update a field in my table tblGeneralSiteInfobased on a join to another table listing those recordsto update...seems simple to me but my SP will not savebecause of a syntax error.Anyone any thoughts?Thanks...RUPDATE tblGeneralSiteInfoJoin tblGeneralSiteInfo ON #TempSites.SiteCollectorCode = tblGeneralSiteInfo.SiteCollectorCodeAnd #TempSites.SiteNum = tblGeneralSiteInfo.SiteNumSET SiteWCODistrict = @SiteWCODistrict |
|
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
Posted - 2003-12-30 : 11:53:08
|
| [code]UPDATE tblGeneralSiteInfoSET SiteWCODistrict = @SiteWCODistrictFROM tblGeneralSiteInfoJoin #TempSites ON #TempSites.SiteCollectorCode = tblGeneralSiteInfo.SiteCollectorCodeAnd #TempSites.SiteNum = tblGeneralSiteInfo.SiteNum[/code] |
 |
|
|
RussB17
Starting Member
4 Posts |
Posted - 2003-12-30 : 12:48:25
|
| Thank You!! Ehorn |
 |
|
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
Posted - 2003-12-30 : 12:55:11
|
| Glad that worked for you RussB17. |
 |
|
|
|
|
|