Click here to Skip to main content
13,800,574 members
Rate this:
 
Please Sign up or sign in to vote.
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 6-Dec-18 19:57pm
Updated 6-Dec-18 23:13pm

1 solution

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.181215.1 | Last Updated 7 Dec 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100