PrepAway - Latest Free Exam Questions & Answers

2 Comments on “Which code segment should you use?

  1. mickeyW says:

    the right Answer would be:

    SELECT Projects.details.query(‘Project/Tasks/Task[IsFinished=”true”]’)
    FROM Projects
    WHERE Projects.ID = 1;

    or

    SELECT Projects.details.query(‘//Task[IsFinished=”true”]’)
    FROM Projects
    WHERE Projects.ID = 1;

    Errors in answer A:
    there is a ‘/’ in front of the ‘[‘
    and a ‘@’ behind the ‘[‘ (the ‘@’ would have been right if ‘IsFinished’ had been an attribute, but it is an element)

    Errors in answer B:
    the ‘]’ is missing and the ‘/’ between Task and IsFinished has to be a ‘[‘

    Error in answer C:
    doesn’t work with xml as type for the column ‘details’

    Error in answer A:
    there is a ‘@’ behind the ‘[‘
    (this would have been right if ‘IsFinished’ had been an attribute, but it is an element)




    0



    0
  2. mickeyW says:

    sry the last passage should be:

    Error in answer D:
    there is a ‘@’ behind the ‘[‘
    (this would have been right if ‘IsFinished’ had been an attribute, but it is an element)




    0



    0

Leave a Reply