Search This Blog

September 15, 2014

Fixed the issue- Order by string ( 1,11,2,21,3), not by number (1,2,3,4)

Today I ran the SOAtest and found one test failed.I checked the SQL query and it used 
Order by FieldName. The data is returned as follows (order by string)

1149
1180
1339
135
1365
140
23
.....

When I opened WCF test client and invoked the web service, it returned the following data (order by number)

23
53
60
78
135
140
271
292
453
.....

After looking into this interesting issue, I modified the following SQL query and it is working perfectly.


Order by FieldName *1

No comments: