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 |
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2007-04-26 : 06:15:50
|
| What is wrong with this query please?declare @tblSpotRateCodes table ( ID int identity(1, 1), SpotRateCode varchar(6) --length of 6 because spotRate code is combined of two currencies... ) declare @tblSpotRateValues table ( ID int identity(1, 1), CurrencyPairID int null, BID decimal(20, 15) null, ASK decimal(20, 15) null, MID decimal(20, 15) null )update @tblSpotRateValues inner join @tblSpotRateCodes on @tblSpotRateValues.ID = @tblSpotRateCodes.IDset @tblSpotRateValues.CurrencyPairID = @tblSpotRateCodes.SpotRateCodeERROR:Msg 156, Level 15, State 1, Line 17Incorrect syntax near the keyword 'inner'.Msg 137, Level 15, State 1, Line 20Must declare the scalar variable "@tblSpotRateValues". |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-26 : 06:25:43
|
Learn to not think MS Access SQL queries.Learn to think MS SQL Server.update tset t.CurrencyPairID = u.SpotRateCodefrom @tblSpotRateValues as tinner join @tblSpotRateCodes as u on u.ID = t.ID Peter LarssonHelsingborg, Sweden |
 |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2007-04-26 : 06:34:11
|
| Thanks |
 |
|
|
|
|
|
|
|