Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

How to call stored procedure which takes xml as parameter using hibernate

i am currently working in spring boot to develop microservices. there is requirement to call stored procedure which takes xml as parameters using hibernate. below is the sample stored procedure.

CREATE PROCEDURE samplepr(@estimate XML, @notes XML, @tasks XML, @constructionEstimateDetails XML, @enggEstimateDetails XML, @location XML, @serviceability XML, @medium XML, @technology XML)
AS
BEGIN
    --DECLARE @enggEstimateDetails XML
    --SET @enggEstimateDetails = '<EnggEstimateDetails>
                 <TotalEstimateAmt>34.7</TotalEstimateAmt>
                                                                                 <ServiceTypeCost> </ServiceTypeCost>
                 <oracleTask#>CAE01</oracleTask#>
                 <ServiceType>Critical Access Equipment</ServiceType>
                 <costSubTotal>34.7</costSubTotal>
                                                       </EnggEstimateDetails>’

SELECT T.C.value('.', 'NVARCHAR(100)') AS [TotalEstimateAmt]
    INTO #tblEnggEstimate
    FROM @TotalEstimateAmt.nodes('/EnggEstimateDetails/TotalEstimateAmt') as T(C)

    //Upsert operation to be done
    INSET INTO enggEstimate_table
    VALUES(SELECT tblEnggEstimate.totalEstimateAmt.value('double', 'double'))

    DROP TABLE #tblEnggEstimate
END
GO

Comments