After running my programm I recieved a big query but it doesn’t work
Probably you can help me ,where a problems.Thanks.
This is a query:
select front., image_data.Type, image_data.ContentType, image_data.GUID, image_data.Size, image_data.Width, image_data.Height from image_info as front inner join image_data on front.image_id = image_data.image_info_id where front.Image_ID in (select front.image_id from image_info as front inner join image_data on front.image_id = image_data.image_info_id inner join photo_in_album on photo_in_album.Image_ID = front.Image_ID where photo_in_album.Album_ID = 1 AND image_data.type = 4 AND front.IsReverse = 0 union select reverse.image_id from image_info as front left outer join image_info as reverse on front.Reverse_Image_ID = reverse.Image_ID left outer join image_data on reverse.Image_ID = image_data.image_info_id left outer join photo_in_album on photo_in_album.Image_ID = front.Image_ID where photo_in_album.Album_ID = 1 AND image_data.type = 4 AND front.IsReverse = 0)) union select reverse., image_data.Type, image_data.ContentType, image_data.GUID, image_data.Size, image_data.Width, image_data.Height from image_info as front left outer join image_info as reverse on front.Reverse_Image_ID = reverse.Image_ID left outer join image_data on reverse.Image_ID = image_data.image_info_id where front.Image_ID in (select front.image_id from image_info as front inner join image_data on front.image_id = image_data.image_info_id inner join photo_in_album on photo_in_album.Image_ID = front.Image_ID where photo_in_album.Album_ID = 1 AND image_data.type = 4 AND front.IsReverse = 0 union select reverse.image_id from image_info as front left outer join image_info as reverse on front.Reverse_Image_ID = reverse.Image_ID left outer join image_data on reverse.Image_ID = image_data.image_info_id left outer join photo_in_album on photo_in_album.Image_ID = front.Image_ID where photo_in_album.Album_ID = 1 AND image_data.type = 4 AND front.IsReverse = 0));