Quote:
|
I couldnt do that Query with POSSTR, but was able to do with LOCATE.
|
LOCATE is a special case of POSSTR, in which you can specify the starting position from where to start looking for the search-string. It surprises me that you can't get it working with POSSTR. Can you give the failing SQL and the error?
Quote:
|
I heard that POSSTR will be removed in DB2 V8.2 , It is true?
|
That would mean rewriting all the existing programs that use POSSTR. Normally DB2 wants to be back compatible as much as possible. Don't believe a word of it. Doesn't DB2 v8.2 already exist about 2 years?
Quote:
|
LOCATE works only for string, Is there any such Query which will work for Integers for the same condition.
|
In this case, you'd better use the solution suggested by Brett Kaiser. His solution is more general, but a bit more complex.
If you only need strings, I'd use the POSSTR-solution.
If you need other data types too, you'd better use Brett's solution.
Quote:
|
The table was a sample table I had choosen for a larger solution. I may not be able to provide the original table as per company restrictiuons. I hope you understand my difficuly.
|
I'm not interested in the (confidential) data, but in the structure of the table, at least the few columns that would make it possible for somebody else to replicate your problem and find a solution. I hope you understand my difficulty.
