VetLink PRO

Connecting Veterinary Professionals with Smarter Solutions

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

Staff Member Already in the Diary

v7

from version 7.3.4 if you get message saying staff member already in the diary it may be because they have been "Replaced" as staff on the diary.

You can run query below to see if replace was used

select DRD."Ref_Number", "Branch", DP."Dry_Name" "Diary", DRD."Date", DRD."Modified_On",
DRD."Org_Staff", SM2."Id", DRD."Stf_Num", SM1."Id", DRD."Start", DRd."Finish"
from "Diary_Roster_Day" DRD
join "Diary_Profile" DP on DP."Site_Ref" = DRD."Branch" and DRD."Dry_Num" = Dp."Dry_Number"
left outer join "Staff_Main" SM1 on SM1."Ref_Number" = DRD."Stf_Num"
left outer join "Staff_Main" SM2 on SM2."Ref_Number" = DRD."Org_Staff"
where ("Org_Staff"  = 1000000???? or "Stf_Num" = 1000000????) //Staffnumber to search
and "Date" = '?? ??? 20??'//Day of error

If they have been replaced you can use below to remove the OrgStaff
update "Diary_Roster_Day"
set "Org_Staff" = null
where "Ref_Number" = 100000?????//Ref number from previous query of row to update