Although I've used stored procedures for execute commands against the database, this is the first time I'm using one for a list method.
Basically, I want it to query the data slightly based on whether or not they're searching for completed records (<> 1) or incomple records (=1).
When I try to create the Smart Object, however, it gives me two sets of properties UnitID, GroupID, UnitID(1), GroupID(1). That doesn't work...
Anyway, my SPROC is as follows. Anyone have any thoughts?
Rob
ALTER PROCEDURE Tdbo].OGroup_aggregated_sproc_2]
@Searchtype int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
if @searchtype = 1 begin
select UnitID, GroupID from recon_work_items
where (currentstatus = 1 or currentstatus > 20)
group by UnitID, GroupID
end
else
if @searchtype <> 1
begin
select UnitID, GroupID from recon_work_items
where currentstatus between 2 and 20
group by UnitID, GroupID
END
end