Soluga
asked on
Cannot call methods on uniqueidentifier
Hi,
When I try to run the stored proc below, I keep getting the error "Cannot call methods on uniqueidentifier."
This is to do with my AND statement. All the id's are uniqueidentifiers.
Would be grateful for any help.
Thanks
When I try to run the stored proc below, I keep getting the error "Cannot call methods on uniqueidentifier."
This is to do with my AND statement. All the id's are uniqueidentifiers.
Would be grateful for any help.
Thanks
alter PROCEDURE usp_M05_GetAllOptionalWorkgroups
-- Add the parameters for the stored procedure here
@onlineCourseID Uniqueidentifier
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SELECT tbl_M04_Wgs.WorkgroupID, tbl_M04_Wgs.WorkGroupName, CONVERT(Int, tbl_M04_Wgs.WorkGroupStatus) AS Status, tbl_M05_OCOWA.OptionalAssignmentID
FROM tbl_M04_Workgroups AS tbl_M04_Wgs LEFT OUTER JOIN
tbl_M05_OnlineCourseOptionalWorkGroupAssignments AS tbl_M05_OCOWA ON tbl_M04_Wgs.WorkgroupID = tbl_M05_OCOWA.OptionalWorkGroupID
WHERE (tbl_M04_Wgs.WorkGroupStatus = '1') AND (tbl_M04_Wgs.WorkgroupID.WorkgroupID NOT IN
(SELECT MandatoryWorkGroupID
FROM tbl_M05_OnlineCourseMandatoryWorkGroupAssignments AS tbl_M05_OCMWA
WHERE (MandatoryWorkGroupID = @onlineCourseID)))
ORDER BY tbl_M04_Wgs.WorkGroupName
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Doh!
Flipping heck, I've been lookint at it for ages lol
Cheers
Flipping heck, I've been lookint at it for ages lol
Cheers
alter PROCEDURE usp_M05_GetAllOptionalWork
-- Add the parameters for the stored procedure here
@onlineCourseID Uniqueidentifier
AS
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SELECT tbl_M04_Wgs.WorkgroupID, tbl_M04_Wgs.WorkGroupName,
FROM tbl_M04_Workgroups AS tbl_M04_Wgs
LEFT OUTER JOIN tbl_M05_OnlineCourseOption
ON tbl_M04_Wgs.WorkgroupID = tbl_M05_OCOWA.OptionalWork
WHERE (tbl_M04_Wgs.WorkGroupStat
AND (tbl_M04_Wgs.WorkgroupID.W
(SELECT MandatoryWorkGroupID
FROM tbl_M05_OnlineCourseMandat
WHERE (MandatoryWorkGroupID = @onlineCourseID)))
ORDER BY tbl_M04_Wgs.WorkGroupName