Jul-10-2020, 04:54 AM
HI All,
I have an input file sample like below
I have to break the SQL and create an output xml like below
Can someone help ? As im new to the xml and Im also trying but not able to get the desired answer.
Thanks,
Aarush
I have an input file sample like below
1 2 3 4 5 6 7 8 9 10 |
< file = "excel.1ew9u4t0tggb9315darmm0nfz2kb" name = "Custom SQL Query" type = "text" >SELECT [EMP$].[Category] AS [Category],& #13,&#10, [EMP$].[A] AS [A],& #13,&#10, [EMP$].[B] AS [B],& #13,&#10, [EMP$].[C] AS [C],& #13,&#10, [EMP$].[D AS [D,& #13,&#10, [Dept$].[E] AS [E],& #13,&#10, [Dept$].[F] AS [F (Dept)]& #13,&#10,FROM [EMP$]&#13,&#10, INNER JOIN [Dept$] ON [EMP$].[F] = [Dept$].[F] < / file > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
<records class = "column" > <remote - name>A< / remote - name> <remotetype> 130 < / remotetype> <local - name>[A]< / local - name> <parent - name>[Custom SQL Query]< / parent - name> <remote - alias>A< / remote - alias> <ordinal> 1 < / ordinal> <local - type >string< / local - type > <aggregation>Count< / aggregation> <contains - null>true< / contains - null> <collation - flag> 1 < / collation - flag> <attributes> <attribute datatype = "string" name = "DebugRemoteType" >WSTR< / attribute> < / attributes> < / records> <records class = "column" > <remote - name>B< / remote - name> <remotetype> 130 < / remotetype> <local - name>[B]< / local - name> <parent - name>[Custom SQL Query]< / parent - name> <remote - alias>B< / remote - alias> <ordinal> 2 < / ordinal> <local - type >string< / local - type > <aggregation>Count< / aggregation> <contains - null>true< / contains - null> <collation - flag> 1 < / collation - flag> <attributes> <attribute datatype = "string" name = "DebugRemoteType" >WSTR< / attribute> < / attributes> < / records> and so on for c , d etc |
Thanks,
Aarush