A user wants to convert numeric field values to strings and also to sort on those values.
Which command should be used first, the eval or the sort?
A user wants to convert numeric field values to strings and also to sort on those values.
Which command should be used first, the eval or the sort?
When converting numeric field values to strings and then sorting, it is essential first to convert the numeric values to strings using the eval command. This is because sorting alphanumeric strings directly ensures they will be sorted in the correct order intended for strings. If you sort numerically first and then convert to strings, it could disrupt the intended sort order since the primary goal is to work with the string representation. Therefore, first converting to strings with eval and then sorting is the correct approach.
Use sort first, then convert the numeric to a string with eval. C
To order numerically, first sort, then use eval - page 107
This is correct
it's simple logic .... If you convert to string first, when ordering it will be by the characters and not by the value of the number.
If you convert to a string first you will have this kind of ordenation: 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21...
C is the correct answer. see p107 of f2
C is correct
C is correct
Does it not depend on how you are reading this question. It states that a user wants to convert numeric field values to strings and also sort on those values... does it mean they want to sort based on the numeric value or the string value. You could read it either way I think???
the logical answer is C, sorting the numbers first and then converting to string. However the wording of the questions make it sound like they want to convert first and then sort alphanumerically so B is the answer. The wording on the question needs to be more clear
I think it's A as It doesn't matter if you are soring before or after as they are all numeric fields and the resutls will be the same.
Answer is C
C is wrong becasue If you use the sort command first and then the eval command, you need to ensure that the sort command is sorting the values in the desired way (i.e., as strings rather than numerically), and you need to use the str function within the sort command to force it to treat the values as strings. This can make the command more complicated and increase the likelihood of errors.
Tested and the answer is B. C does not sort on the values
A is the correct answer, it doesn't matter which one will you use first. it will give you the same output
if you sort after tostring, it will sort based alphanumerically, rather than on value; 100 will come before 20. If they want to sort on values (numbers), sort first, otherwise you're essentially alphabetizing. Badly worded question, but Pg 107 states "to order numerically, first sort, then use eval".
Why would you sort values in an alpha-numeric way? that's not logit, that said, you sort first, then eval. Fund 2 Page 104 (c) sort first then eval
Fun2(page ) justifies option C
Answer is C, sort first. Always.
The answer is C
You have to sort first and then convert to a string. So Answer C.
C is correct
C is correct
Sort numerically first always.
need to be sort out in numeric format only
B and C return the same result so the correct anws is A