This is the last time I worked on a db2 database. I want to say that I am no expert in this kind of DBMS, but recently I used to develop a site in php.
For the purpose of the site, I make a request via a search form with a pagination on a web page. The goal is to return the results of a search results with pagination whether to have page numbering.
To do so I make a motion that resembles the kind of model:
In this sample query that I present, I use the function rownumber to simplify the results returned by the query based paging which I find myself on the screen of my site. And so, I use the UPPER function in order to limit the damage of uppercase, lowercase for the search that is integrated into my web page.Code:SELECT * FROM ( SELECT rownumber() OVER (ORDER BY ID) AS ID_NEXT, NAME FROM MYTABLE WHERE NAME LIKE '%Test%' OR UPPER(NAME) LIKE '%TEST%' ) AS TABLE WHERE ROW_NEXT BETWEEN 1 AND 15
However, in this post or this forum during the execution of my application it fails to run. If I remove the upper function, the query returns results to me. From where I said that to a couple upper rownumber can run.
Hence my question. Is there a possibility of linking with an upper rownumber performing a different query or are there an equivalent in db2 could meet my needs?
Bookmarks