COMPLEX QUERY PROBLEM
Hello all
Bellow you see a rather complex query which I run against SQL Server 2000 against my ASP pages.
SELECT welcome_page.title, welcome_page.body, welcome_page.displ_date, welcome_page.img_id, welcome_page.pos, welcome_page.border, welcome_page.url, welcome_page.snd_id, welcome_page.embed, welcome_page.vid_id, users_imgs.img_file, users_imgs.img_width, users_imgs.img_height, users_imgs.img_alt, users_sounds.snd_file, users_sounds.snd_name, users_vids.vid_file, users_vids.vid_name FROM users_vids RIGHT JOIN (users_sounds RIGHT JOIN (users_imgs RIGHT JOIN welcome_page ON users_imgs.img_id = welcome_page.img_id) ON users_sounds.snd_id = welcome_page.snd_id) ON users_vids.vid_id = welcome_page.vid_id where welcome_page.site_id = @siteid
It does not "give me" back the value of "welcome_page.img_id" field. It returns it null. When i execute the same query directly through the Query Analyzer of SQL Server, it sends back all values as it should.
When I execute it against an Access db (through my ASP page), it also works fine. The problem appears only when it runs against SQL Server.
One more detail: If I add the "users_imgs.img_id" field it gives me its value fine, but it send blank the value of "welcome_page.snd_id" field this time.
Strange. Can anybody explain this?
Thanks in advance
Nick
|