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 |
|
snehal20
Starting Member
3 Posts |
Posted - 2006-10-03 : 04:04:16
|
| Getting error while executing this query!Error:AccessLevelsServer: Msg 170, Level 15, State 1, Line 1Line 1: Incorrect syntax near 'AccessLevels'.Server: Msg 105, Level 15, State 1, Line 1Unclosed quotation mark before the character string 'ABC'.demotestServer: Msg 170, Level 15, State 1, Line 1Line 1: Incorrect syntax near 'demotest'.Server: Msg 105, Level 15, State 1, Line 1Unclosed quotation mark before the character string 'ABC'.Query:EXEC ('update ''' + @tablename + ''' SET PortalID=''' + @OldPortalId + ''' where PortalID ='''+ @NewPortalId ) |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-10-03 : 04:06:02
|
[code]EXEC ('update ' + @tablename + ' SET PortalID = ''' + @OldPortalId + ''' where PortalID = ''' + @NewPortalId + '''')[/code] KH |
 |
|
|
snehal20
Starting Member
3 Posts |
Posted - 2006-10-03 : 07:42:56
|
quote: Originally posted by khtan
EXEC ('update ' + @tablename + ' SET PortalID = ''' + @OldPortalId + ''' where PortalID = ''' + @NewPortalId + '''') KH
Thanx a lot!!! |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-10-03 : 08:57:39
|
| Why do you want to pass table name as parameter?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|