Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql code

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am creating a report with oracle reports 6i and have entered this code as a query, however it is returning me no records, when I know there are some, so can anyone tell me where my code is going wrong?select s.academic_year, s.hall_code, s.res_ref, s.surname, s.forenames, nvl(s.left_hall,'')from res_search s, res_movs mwhere s.hall_code &WHERE_SQLand (s.res_ref, nvl(s.left_hall,''))in (select s1.res_ref, max(s1.left_hall)from res_search s1where s1.res_ref = s.res_refand s1.academic_year = s.academic_yeargroup by res_ref)and s.hall_code = m.hall_codeand s.academic_year = m.academic_yearand s.hall_seq = m.hall_seqand dealt_by_finance is nulland s.hall_code is not null
 
Just a tip, dave<br>If you formatted your query in a more readable format, you might get more people willing to dig into it. <p>Malcolm Wynden<br><a href=mailto:wynden@island.dot.net>wynden@island.dot.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top