1

I have below XML. I need to check if any of column in this row has a value or not.

<row>
    <Row></Row>
    <TaskName></TaskName>
    <TaskType>someFooValue</TaskType>
    <PlanDate></PlanDate>
    <ForecastDate></ForecastDate>
    <Status></Status>
    <AssignedTo></AssignedTo>
    <Predecessors></Predecessors>
    <SortOrder></SortOrder>
    <Duration></Duration>
    <PerComplete></PerComplete>
    <PlannedEndDate></PlannedEndDate>
    <ForecastEndDate></ForecastEndDate>
</row>

1 Answer 1

2
select @data.exist('row/*[text()]')

Will return 1 if there're some non-empty value.

sql fiddle demo

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.