I am trying to create a report based on the contents of two tables like so.
select *
from A inner join B on A.key = B.foreignkey
where A.date = {?dateparam}
and B.field like {?multi value param}
order by B.SequenceNumber ASC
I have a problem though in that for each row in A there are 1 or more in B and no way to exclude the 'extra' rows (I just want the first one with the lowest SequenceNumber).
I think I will need to solve this with a stored procedure and use a cursor to 'skip' over the extra rows but I have never used one before and have not found the help files too helpful.
I am using crystal 8.5 and would like to know how I can return specific rows using a cursor in stored proc. I also need to use a multi value string parameter to select with and don't know how to do this.
Thanks in advance.
select *
from A inner join B on A.key = B.foreignkey
where A.date = {?dateparam}
and B.field like {?multi value param}
order by B.SequenceNumber ASC
I have a problem though in that for each row in A there are 1 or more in B and no way to exclude the 'extra' rows (I just want the first one with the lowest SequenceNumber).
I think I will need to solve this with a stored procedure and use a cursor to 'skip' over the extra rows but I have never used one before and have not found the help files too helpful.
I am using crystal 8.5 and would like to know how I can return specific rows using a cursor in stored proc. I also need to use a multi value string parameter to select with and don't know how to do this.
Thanks in advance.