Simple XQUERY update replace problem (non experienced user)

I got a little problemmm…
I got the following 2 documents inside the database:

1
MLSonline
Connect
2007-03-06 14:47:01.968

2655
Testlieferant

2000-01-20 00:00:00.000

Processing


2
MLSonline
Connect
2007-03-06 14:47:21.125

2655
Testlieferant

2000-01-20 00:00:00.000

Processing

Now i wanted to update some elements of the first document:
update for $a in input()/MLSSyncHistory
where $a/SyncID = “1”
do (
replace $a/EndDate/text() with (“2007”)
replace $a/CacheType/text() with (“SuperFull”)
replace $a/LastModNew/text() with (“MistakesAllOvertheWorld”)
)

i can run the update query in Interactive Interface, there is no error. But the content arent updated…any idea?

Try:


declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
update for $a in input()/MLSSyncHistory 
where $a/SyncID = "1" 
do ( 
replace $a/EndDate/text() with tf:createTextNode("2007") 
replace $a/CacheType/text() with tf:createTextNode("SuperFull") 
replace $a/LastModNew/text() with tf:createTextNode("MistakesAllOvertheWorld") 
) 

or


update for $a in input()/MLSSyncHistory 
where $a/SyncID = "1" 
do ( 
replace $a/EndDate with <EndDate>2007</EndDate>
replace $a/CacheType with <CacheType>SuperFull</CacheType> 
replace $a/LastModNew with <LastModNew>MistakesAllOvertheWorld</LastModNew> 
) 

thanks.
But its the same, problem isnt solved.

both of the queries are running without any failed information.
But the instance has never been updated…

If i update one single element, then its working, see this query:

update replace input()/MLSSyncHistory[SyncID=“1”]/EndDate
with 2007

but if i try to update all elements in one query, then its not done (see above posted message)

Sorry.

My response was misleading as I hadn’t realised that the problem is related to whether the nodes have content or not.

So it doesn’t matter whether TII or an API had been used.

Hi,

when I test the second update statement


update for $a in input()/MLSSyncHistory
where $a/SyncID = "1"
do (
replace $a/EndDate with <EndDate>2007</EndDate>
replace $a/CacheType with <CacheType>SuperFull</CacheType>
replace $a/LastModNew with <LastModNew>MistakesAllOvertheWorld</LastModNew>
) 

it works fine. Which version of Tamino are you using?

Regards

Harald