Home » Developer & Programmer » Reports & Discoverer » report
report [message #686644] Wed, 09 November 2022 09:41 Go to next message
scdc2003
Messages: 1
Registered: November 2022
Junior Member
When making a query, there are no results in this report. Please help

SELECT ALL ROOMS.ROOM_NO, PATIENT_INFO.PATIENT_CODE, PATIENT_INFO.P_NAME,
PATIENT_INFO.INSURANCE_NO, PATIENT_INFO.MARKER, PATIENT_INFO.FOOD,
PATIENT_INFO.T_TIME, PATIENT_INFO.REG_DATE, PATIENT_INFO.DIV_CODE, PATIENT_INFO.NOTES, PATIENT_INFO.TIME_OPER, PATIENT_INFO.P_RECEV
FROM PATIENT_INFO, ROOMS
WHERE (PATIENT_INFO.FOOD = 1
AND PATIENT_INFO.MARKER<>1
AND (PATIENT_INFO.PATIENT_CODE = ROOMS.EXIST_PATIENT))
AND PATIENT_INFO.REG_DATE= :s

ORDER BY PATIENT_INFO.REG_DATE

Re: report [message #686655 is a reply to message #686644] Fri, 11 November 2022 07:18 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If query returned nothing, then its WHERE clause prevents it to happen. We don't have your tables nor data so we can't check it, but you might, so:

- there's no row in PATIENT_INFO whose FOOD = 1,
- there's no row in PATIENT_INFO whose MARKER <> 1
- there are no matching rows in PATIENT_INFO and ROOMS joined on PATIENT_CODE = EXIST_PATIENT
- you passed :S value to the query, and there are no rows whose PATIENT_INFO.REG_DATE equals value being passed via :S
Previous Topic: Two-sided prining. Variable indent.
Next Topic: Date parameter diff return wrong calculation
Goto Forum:
  


Current Time: Thu Nov 21 07:20:17 CST 2024