Larry Brister
asked on
vb.Net loop through Dataset.Table(0)
I have a dataset being returned from SQL Server into my web form
It has a column  called BatchNumber that can be from 1 to 1000 rows
I also have a comma seperated string
strMyList = "1,3,5,7"
I would like to remove from strMyList any value not in the "longer list"
So that if the dataset does not have BatchNumber 3 then
strMyList would = "1,5,7"
It has a column  called BatchNumber that can be from 1 to 1000 rows
I also have a comma seperated string
strMyList = "1,3,5,7"
I would like to remove from strMyList any value not in the "longer list"
So that if the dataset does not have BatchNumber 3 then
strMyList would = "1,5,7"
Can you explain more clearly may be by sending some screen shots of input and output
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
based on my understanding for the requirement and referring to sample of Stefan in ID: 42431385, shouldn't that INTERSECT should be used instead of EXCEPT?
provided:
provided:
INSERT INTO @Batches ( BatchNumber )
VALUES ( 1 ) ,
( 5 ) ,
( 7 ) ,
( 9 );
DECLARE @Parameter VARCHAR(MAX) = '1,3,5,7';
@Ryan, indeed.. misinterpret the OP's requirement.
ASKER
Sorry for late get back
Thanks
Thanks