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-07-12 : 12:15:16
|
Hi,What is the correct syntax to get this query to work please.I think there is a problem with set xmlContents =I think the rest is self explanatory.Thanksupdate tblTrades set xmlContents = Exec ('SELECT Cast(BulkColumn as Nvarchar(max)) FROM OPENROWSET(BULK ''' + @FilePath + ''', SINGLE_CLOB) as D') where TradeFileName = @TradefileName |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-07-12 : 12:29:18
|
simply put you can't use exec in update statements._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-07-12 : 13:02:31
|
create table #a(s varchar(8000))insert #a Exec ('SELECT Cast(BulkColumn as Nvarchar(max)) FROM OPENROWSET(BULK ''' + @FilePath + ''', SINGLE_CLOB) as D')updatetblTradessetxmlContents = (select s from #a)==========================================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. |
|
|
|
|
|