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 |
|
fmardani
Constraint Violating Yak Guru
433 Posts |
Posted - 2007-02-26 : 12:09:30
|
| Hi,I know how to select using openxml.Could you please let me have a sample code on how to delete records from a table based on what is inside an xml.ThanksSomething like:delete from table1whereOPENXML (@idoc, '/marketData/forwardCurves/forwardCurve/maturities/maturity',2) WITH ( contractMonth varchar(50), [date] datetime, mid varchar(50), bizDays int ) |
|
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2007-02-26 : 12:32:31
|
| Your going to have to join the table you want to delete with the data from the OPENXML command.DELETE aFROM table1 a INNER JOIN OPENXML(...) b ON (a.ID = b.ID)WHERE ... |
 |
|
|
|
|
|