markgrizzle
Programmer
Hi Everyone,
My program is failing so I stepped through my asp/vb.net method and copy/paste/parsed the content below from my string variable into the query window;
update data set affiliated_unit = account_code
where company = 'US - Charleston Place Hotel'
and account_code in (select account_code from intercompany_account
where property = 'US - Charleston Place Hotel')
The parser generates this error:
" Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ' '. "
But if I manually type the same statement and parse it, it succeeds.
update data set affiliated_unit = account_code
where company = 'US - Charleston Place Hotel'
and account_code in (select account_code from intercompany_account
where property = 'US - Charleston Place Hotel')
"Command(s) completed successfully."
I've been going in circles trying to understand this. Has anyone seen this before?
Thanks in advance,
Mark
ps - My environment is listed below (copied from the About SQL Server dialog)
Microsoft SQL Server Management Studio 9.00.4035.00
Microsoft Analysis Services Client Tools 2005.090.4035.00
Microsoft Data Access Components (MDAC) 6.0.6002.18005 (lh_sp2rtm.090410-1830)
Microsoft MSXML
3.0 6.0
Microsoft Internet Explorer
8.0.6001.18975
Microsoft .NET Framework
2.0.50727.4206
Operating System
6.0.6002
My program is failing so I stepped through my asp/vb.net method and copy/paste/parsed the content below from my string variable into the query window;
update data set affiliated_unit = account_code
where company = 'US - Charleston Place Hotel'
and account_code in (select account_code from intercompany_account
where property = 'US - Charleston Place Hotel')
The parser generates this error:
" Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ' '. "
But if I manually type the same statement and parse it, it succeeds.
update data set affiliated_unit = account_code
where company = 'US - Charleston Place Hotel'
and account_code in (select account_code from intercompany_account
where property = 'US - Charleston Place Hotel')
"Command(s) completed successfully."
I've been going in circles trying to understand this. Has anyone seen this before?
Thanks in advance,
Mark
ps - My environment is listed below (copied from the About SQL Server dialog)
Microsoft SQL Server Management Studio 9.00.4035.00
Microsoft Analysis Services Client Tools 2005.090.4035.00
Microsoft Data Access Components (MDAC) 6.0.6002.18005 (lh_sp2rtm.090410-1830)
Microsoft MSXML
3.0 6.0
Microsoft Internet Explorer
8.0.6001.18975
Microsoft .NET Framework
2.0.50727.4206
Operating System
6.0.6002