Untitled

 avatar
unknown
sql
a month ago
1.9 kB
5
Indexable
select title, abstract, a_name_surname, s.s_name_surname as 'x', cs.s_name_surname as 'y', in_name, uni_name, topic_name, keyword, type, number_of_pages, language, year, submission_date from thesis
	left outer join author on author.author_id = thesis.author_id
	left outer join type on type.type_id = thesis.type_id
	left outer join thesis_cosupervisor tsc on tsc.thesis_id = thesis.thesis_id
		left outer join supervisor cs on cs.supervisor_id = tsc.supervisor_id
	left outer join thesis_supervisor ts on ts.thesis_id = thesis.thesis_id
		left outer join supervisor s on s.supervisor_id = ts.supervisor_id
	left outer join thesis_keywords on thesis_keywords.thesis_id = thesis.thesis_id
		left outer join keywords on keywords.keyword_id = thesis_keywords.keyword_id
	left outer join thesis_subject_topics on thesis_subject_topics.thesis_id = thesis.thesis_id
		left outer join subject_topics on subject_topics.subject_topics_id = thesis_subject_topics.subject_topic_id
	left outer join university on university.university_id = thesis.university_id
	left outer join institutes on institutes.institutes_id = thesis.institute_id
	left outer join language on language.language_id = thesis.language_id
	where (title = @title or @title = "")
		and (abstract = @abstract or @abstract = "")
		and (a_name_surname = @a_name or @a_name = "")
		and (s.s_name_surname = @s_name or @s_name = "")
		and (cs.s_name_surname = @cs_name or @cs_name = "")
		and (in_name = @in_name or @in_name = "")
		and (uni_name = @uni_name or @uni_name = "")
		and (topic_name = @topic_name or @topic_name = "")
		and (keyword = @keyword or @keyword = "")
		and (type = @type or @type = "")
		and (number_of_pages = @number_pages or isnull(@number_pages,0) = 0)
		and (language = @language or @language = "")
		and (year = @year or @year = "")
		and (submission_date = @sub or @sub = "")
Leave a Comment