developer2012
asked on
How to check whether the data has two,three and four values in it separated by (,) and eliminate it?
How to check whether the data has two, three and four values in it separated by( (,) and eliminated it?
For example when I retrieve a primary key from the database. Sometime, it has
Individual value --> (1234)
two values --> (1234,1234)
three value --> (1234,1234,1234)
Four values --> (1234,1234,1234,1234)
well, I am supposed to proceed with the only individual value and eliminate the rest of the things?
Can somebody please help how to develop the logic to write the function?
Thanks everyone !
For example when I retrieve a primary key from the database. Sometime, it has
Individual value --> (1234)
two values --> (1234,1234)
three value --> (1234,1234,1234)
Four values --> (1234,1234,1234,1234)
well, I am supposed to proceed with the only individual value and eliminate the rest of the things?
Can somebody please help how to develop the logic to write the function?
Thanks everyone !
That looks weird. (Check the table definition to confirm the key are string values). How do you retrieve that primary key.
ASKER
Yes, those are string values. I retrieve those values by querying the data.
For example
Select primarykey from database where columnname = columnname;
and It returns values like;
1234,
1234,1234,
1234,1234,1234,
1234,1234,1234,1234,
I mean sometimes it may have the single value too, sometime double values
but I am suppose to use only one string value. i.e. something like the format of '1234' and ignore the rest.
Thanks.
For example
Select primarykey from database where columnname = columnname;
and It returns values like;
1234,
1234,1234,
1234,1234,1234,
1234,1234,1234,1234,
I mean sometimes it may have the single value too, sometime double values
but I am suppose to use only one string value. i.e. something like the format of '1234' and ignore the rest.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Andy,
I will implement the function and update here.
Thanks,
D.
I will implement the function and update here.
Thanks,
D.