[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

strange sorting in SQL Reporting Services 2008

Hello:

I have a group sort in SQL Reporitng Services 2008 based on a column's if, then statement (iif function).  The iif function produces a numeric value of 1, 2, 3, etc.

The report is not being sorted by "1, 2, 3, etc." but, by "1, 10, 11, 12....2, 3, 4, etc.".

How do I get it to sort in the correct numeric order of 1, 2, 3, 4, 5, 6, etc.

You see, the report is taking the sort way too literally.  It is sorting 10 before 2.

Thanks!

Apitech
0
apitech
Asked:
apitech
1 Solution
 
Nico BontenbalCommented:
Then your iif function probably returns the values as text for example:
"1"
and not as a number. Replacing
"1"
with
1
might solve your problem.
0
 
apitechAuthor Commented:
Hi Nicobo:

YOU DID IT, AGAIN!  Thank you!  That was it!

Apitech
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now