exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 176 discussion

Actual exam question from Microsoft's 70-761
Question #: 176
Topic #: 1
[All 70-761 Questions]

DRAG DROP -
You have a project management application. The application uses a Microsoft SQL Server database to store data. You are developing a software bug tracking add-on for the application.
The add-on must meet the following requirements:
✑ Allow case sensitive searches for product.
✑ Filter search results based on exact text in the description.
✑ Support multibyte Unicode characters.
You run the following Transact-SQL statement:

You need to display a comma separated list of all product bugs filed by a user named User1.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL segments to the correct locations. Each Transact-SQL segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
References:
https://docs.microsoft.com/en-us/sql/t-sql/functions/string-split-transact-sql?view=sql-server-2017

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Dieter
Highly Voted 5 years, 8 months ago
Select Statement is wrong. Choose @List = Product + ', ' + @List
upvoted 29 times
...
BabyBee
Highly Voted 4 years, 5 months ago
Sample code: DECLARE @tb1 AS TABLE ( Product Nvarchar(25) ) INSERT INTO @tb1 VALUES ('Azul') ,('Verde') ,('Rosa') ,('Morado') ,('blanco') ,('Negro') DECLARE @List Nvarchar(MAX) = ' ' SELECT @List = Product + ',' + @List FROM @tb1 SELECT @List;
upvoted 7 times
...
Vermonster
Most Recent 4 years, 4 months ago
See @BabyBee - thanks!
upvoted 1 times
...
NhiN
4 years, 4 months ago
To remove the first comma: declare @list nvarchar(max); --default is NULL select @list = COALESCE (@list + ',' ,'' ) + product From Bug select @list
upvoted 1 times
...
Anette
4 years, 11 months ago
Correct answer: declare @List nvarchar(MAX) = '' select @List=Product +','+@List from Bug where reportinguser = 'User1' (It must be in comma!!) Select @List
upvoted 4 times
...
vermeilyn
4 years, 11 months ago
You can't start with @List, or the first thing in the list will be a comma
upvoted 3 times
...
anonimdom
5 years, 3 months ago
@List = @List + ', ' + Product looks correct too.
upvoted 5 times
tzaganczyk
4 years, 6 months ago
True, then the result will start with comma, but it will give the proper list of products anyway.
upvoted 1 times
...
...
imran
5 years, 6 months ago
wrong answer in select cant use table.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago