Can you clarify the following:
1) How many is a lot of movies 1000 /100,000 / 10,000,000 ( e.g personal collection, small application, global library)
2) How many parts are you looking at and how would you like the data presented?
Logically wise if there is a reasonable amount of finite parts ( less than 10) you could make some ungainly sql construct to list all previous parts and future parts. How ever if you're just after the single previous if it exists and next if it exists you could try:
Solution 1: (lists all movie parts and the prev and next parts if they exist)
select e1.movie_id, e1.title, pp.movie_id as prev_movie_id, np.movie_id as next_movie_id
from dbo_Movie AS e1
left join dbo_Movie AS pp
ON e1.previous_part = pp.movie_id
left join dbo_Movie AS np
ON np.previous_part = e1.movie_id
Expected output:
movie_id | title | prev_movie_id | next_movie_id
m1p2 | zed | m1p1 | m1p3
m1p3 | zed | m1p2 | null
m1p1 | zed | null | m1p2
m2p1 | phi | null | null
m3p1 | quo | null | m3p2
m3p2 | quo | m3p1 | null
Solution 2.1: Lists all movie parts with previous next parts
select e1.movie_id, e1.title, np.movie_id as next_movie_id
from dbo_Movie AS e1
inner join dbo_Movie AS np
ON np.previous_part = e1.movie_id
--inner join means anything rows where this isn't true will be removed
Expected output:
movie_id | title | next_movie_id
m1p2 | zed | m1p3
m1p1 | zed | m1p2
m3p1 | quo | m3p2
Solution 2.2: Lists all movie parts with previous next parts
select e1.movie_id, e1.title, pp.movie_id as prev_movie_id
from dbo_Movie AS e1
inner join dbo_Movie AS pp
ON e1.previous_part = pp.movie_id
Expected output:
movie_id | title | prev_movie_id
m1p2 | zed | m1p1
m1p3 | zed | m1p2
m3p2 | quo | m3p1
Notes:
1) Nulls are not dealt with cleanly which both prev_movie_id and next_movie_id could be.
2) There is apparently no ANSI sql standard for limiting results in SQL:1999 but there is in later standards as mentioned by bobince in reply to: Is there an ANSI SQL alternative to the MYSQL LIMIT keyword?