sbryant
Posts: 3
|
| Posted: 03/14/2006, 3:09 PM |
|
I am new to CCS and fairly light on SQL, but I am getting towards the small application I need to build, which is great. I am trying to use the Query Builder to return data from 2 more pages than the entered value. i.e the users types in page 10 and the query return records on pages 10,11 and 12
Obviously what I have below doesn't work, but it sort of indicates what I am after ?
Table Parameter = type = URL
Parameter = s_PAGE+2
SELECT SOH.ITEM........................
FROM SOH
WHERE ITEM LIKE '{s_ITEM}%'
AND PAGE >= {s_PAGE}
AND PAGE <= {s_PAGE + 2}
ORDER BY ITEM
What is the best way to achieve this query result ?
Also, is there a way to actually edit the SQL statement directly?
TIA
Steve
|
 |
 |
E43509
Posts: 283
|
| Posted: 03/15/2006, 6:58 AM |
|
Try this
SELECT SOH.ITEM........................
FROM SOH
WHERE ITEM LIKE '{s_ITEM}%'
AND PAGE >= {s_PAGE}
AND PAGE <= {s_PAGE} + 2
ORDER BY ITEM
What language are you writing in? You can also look at the code and before you execute, output the sql string to the screen so you can see what it really is trying to run. You can then take that sql string and run it natively against the db to ensure it returns the result you desire.
|
 |
 |
|