You could consider your TSQL query to give you the XML in the initial query.

using :

Select ....

FOR XML PATH('NameOfDataHere'), ROOT('NameOfDataHere'), ELEMENTS

When you name the columns, put in the XML element path/name

c.ClientCity as "billTo/address/city",




On Tue, Mar 29, 2022 at 6:45 PM Richard Kaye <rk...@invaluable.com> wrote:

> Let’s try this again. (Stupid Outlook…)
>
> That’s another possibility. Thanks, Tracy. 😊
>
> The original data source is coming from a SQL backend so I’ve just added
> some ISNULL calls around the fields which matter to the
> CURSORTOXML/XMLTOCURSOR calls.
>
> --
>
> rk
>
> From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Tracy Pearson
> Sent: Tuesday, March 29, 2022 7:33 PM
> To: profoxt...@leafe.com
> Subject: Re: CURSORTOXML and NULLs
>
> I tend to create the cursor and use flags to append to the existing cursor.
>
> Tracy
>
> On March 29, 2022 7:01:47 PM EDT, Richard Kaye <rk...@invaluable.com
> <mailto:rk...@invaluable.com>> wrote:
> While I'm poking away at this, I thought I'd check with the collective
> wisdom. I've found a situation where I want to take advantage of
> CURSORTOXML and XMLTOCURSOR. The issue I'm running into is if the cursor
> being converted to XML has fields with NULL values in the first record,
> this appears to affect the resulting XMLTOCURSOR conversion. Any NULL
> columns will be missing from the result cursor even if later rows in the
> XML contain values. The hacky workaround seems to be I have to make sure
> that the first record has non-null values for all columns I want in the
> cursor. Anyone have any other magic tricks?
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/CAJidMYKzLjdatmpSR67=p+d1qz69i+ukkq+mzmsgsbo5f0o...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to