Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can you please help me to how to convert below sql server function to db2 format.

CREATE FUNCTION [dbo].[GetKeyStructureXml]
(

@pf_wkstn_oid_sh smallint,

)

RETURNS varchar(max)

AS
BEGIN

DECLARE @RtKeys varchar(Max)

set @RtKeys = (SELECT rt.rbase_field_name,
pf_wkstn_oid_sh,
pf_wkstn_oid_lng,
''N'' status_indc,
rt.field_data_type,
rt.field_size,
''Rate Key '' DisplayType,
'''' Author,
0 DateCreated,
rb.field_level_indc,
rb.field_scope_indc
FROM rt_tmplt_key rt inner join rbase_field_dict rb
on rb.rbase_field_name=rt.rbase_field_name
where pf_wkstn_oid_sh = @pf_wkstn_oid_sh
order by rt_key_sqnc_num asc
FOR XML AUTO, BINARY BASE64,root(''TableKeys''))
RETURN @RtKeys;

END;

please provide some guide and help for the above conversion. it is quite confusing to use XML AUTO and BINARY BASE64 in db2.

What I have tried:

i have tried in XMLSERIALIZE but not able to get the result.

please provide how to create a xml node in db2.
Posted
Updated 6-Dec-18 22:13pm

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900