Hi all,
I am developing a webboard using jsp & db2 and I am stuck in the following SQL statement.
----------------------------------------------------------
case 1)
select * from guestboard
where board_idx not in
( select board_idx from guestboard order by ref desc,re_step asc fetch first 10 rows only)
order by ref desc,re_step asc fetch first 10 rows only
----------------------------------------------------------
I don't know what's wrong with the SQL. I tried so many times and gave up. The funny thing is the following code which is modified a little bit from the original SQL statement works fine.
----------------------------------------------------------
case 2)
select * from guestboard
where board_idx not in
( select board_idx from guestboard )
order by ref desc,re_step asc fetch first 10 rows only
----------------------------------------------------------
In short, case 1 doens't work. Is there anybody who can solve this problem?
Any help would be greatly appreciated.
I am developing a webboard using jsp & db2 and I am stuck in the following SQL statement.
----------------------------------------------------------
case 1)
select * from guestboard
where board_idx not in
( select board_idx from guestboard order by ref desc,re_step asc fetch first 10 rows only)
order by ref desc,re_step asc fetch first 10 rows only
----------------------------------------------------------
I don't know what's wrong with the SQL. I tried so many times and gave up. The funny thing is the following code which is modified a little bit from the original SQL statement works fine.
----------------------------------------------------------
case 2)
select * from guestboard
where board_idx not in
( select board_idx from guestboard )
order by ref desc,re_step asc fetch first 10 rows only
----------------------------------------------------------
In short, case 1 doens't work. Is there anybody who can solve this problem?
Any help would be greatly appreciated.