User Profile

Collapse

Profile Sidebar

Collapse
letmatros
letmatros
Last Activity: Jun 22 '07, 10:31 AM
Joined: Feb 20 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Maybe I don't get the problem, but if your values are always 10 digits, then you could do something where you fetch all records with
    1230000000<= x <=1239999999
    See more | Go to post

    Leave a comment:


  • letmatros
    started a topic Dynamic ORDER BY clause
    in DB2

    Dynamic ORDER BY clause

    Hi, I have a fairly simple select statement, but I want to do pagination and the sort order should be controlled by the user. The last part is causing me problems...

    I use DB2 8.2.3 on Windows. My idea is to create a prepared statement (or a named query) instead of using dynamic SQL.

    SELECT * FROM (SELECT ROWNUMBER() OVER(
    ORDER BY CASE CAST(? AS SMALLINT)
    WHEN 1 THEN a.firstname
    WHEN 2 THEN a.lastname...
    See more | Go to post
No activity results to display
Show More
Working...