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
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 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.
Answer is C
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.
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
B and C return the same result so the correct anws is A
need to be sort out in numeric format only
Sort numerically first always.
C is correct
C is correct
You have to sort first and then convert to a string. So Answer C.
The answer is C
Answer is C, sort first. Always.
Fun2(page ) justifies option C
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