TDS-C01 · Question #126
You have the following string value: Sales Data. Which calculated field produces an output of Sales?
The correct answer is B. LEFT ("Sales Data", 5). LEFT("Sales Data", 5) extracts the first 5 characters from the left of the string, returning "Sales" - exactly the 5 characters S, a, l, e, s. Option A fails because LEFT requires two arguments: the string and the number of characters to extract, so it would produce an error…
Question
You have the following string value: Sales Data. Which calculated field produces an output of Sales?
Exhibit
Options
- ALEFT ("Sales Data")
- BLEFT ("Sales Data", 5)
- CLTRIM ("Sales Data")
- DRTRIM ("Sales Data")
How the community answered
(28 responses)- A4% (1)
- B89% (25)
- D7% (2)
Explanation
LEFT("Sales Data", 5) extracts the first 5 characters from the left of the string, returning "Sales" - exactly the 5 characters S, a, l, e, s. Option A fails because LEFT requires two arguments: the string and the number of characters to extract, so it would produce an error. Options C and D (LTRIM/RTRIM) are trim functions that remove leading or trailing whitespace respectively - neither removes the word " Data" from the string. A useful memory tip: think of LEFT(string, n) as "give me the first n characters from the left" - always count your target characters before the exam to confirm the number argument.
Topics
Community Discussion
No community discussion yet for this question.
