So sollte es funktionieren:
Code:
exec sql select xmldocument(
xmlelement(NAME "Data",
xmlnamespaces(
'www.example.com/1' AS "xsi"),
xmlelement(NAME "Company", digits(max(COMPANY))),
xmlelement(NAME "Store", max(STORE)),
xmlelement(NAME "Date", max(:val_dat_xml)),
xmlgroup(
trim(ID) as "Id",
Case When COUNT > 0 Then COUNT Else NULL End as "Counted",
case when Substr(Trim(char(NUMBER)), 1, 1) = ','
then '0.00' else Trim(Replace(char(NUMBER), ',', '.')) end
as "Number",
order by ID asc
option row "TEST" root "TestList")))
into :myxml
from Data where ID <> ' '
Birgitta
Bookmarks