VetLink PRO

Connecting Veterinary Professionals with Smarter Solutions

Skip to content
English - Australia
  • There are no suggestions because the search field is empty.

SQL - Find Appointments by Reason

v7,v6

Find Future Appointments in Diary Main by Reason select DM."Date", DP."Dry_Name", DM."Stf_Num", DM."Cln_Num", CM."Last_Name", DM."Start" from "Diary_Main" DM join "Client_Main" CM on CM."Ref_Number" = DM."Cln_Num" join "Diary_Profile" DP on DP."Dry_Number" = DM."Dry_Num" where DM."Date" >= current_date -100 and DM."Apt_Type" = 1 and (DM."Reason1" = ??? or DM."Reason2" = ???) //enter reason number here and DP."Site_Ref" = DM."Site_Ref" and DM."Site_Ref" = ? //enter site reference here Active Standing Appointment using Reason select SA."Cln_Number", CM."Last_Name", SA."Start_On" from "Standing_Appointments" SA join "Client_Main" CM on CM."Ref_Number" = SA."Cln_Number" where SA."Status" = 'A' and (SA."Reason" = ???) //enter reason number here