Integer to String Evaluation in SQL Statement
Posted in 2000
Topics: General Discussion
Hi all. Our environment is IDS V7.30.TC9X2 on NT. Does anyone know if it's possible to convert/evaluate an integer value to a string in a SQL statement? My problem is that I have a column (col1) defined as an integer, and I would like to find all rows that contain part of the number. For example, I issue a query to locate all rows where col1 contains the number 5678. The rows to be returned would include values 1356789, 443 5678, 567899, etc. I know I can solve this issue by creating a temporary table containing all distinct col1 values which would be inserted into a string column, and then issue a SQL statement w/ the like clause. However, this is not the most desirable way. Any assistance, or ideas would be appreciated. I can be reached at jhimschoot@crowechizek.com. Thanks for your time.
jhimschoot@CroweChizek.Com wrote: > Hi all. Our environment is IDS V7.30.TC9X2 on NT. Does anyone know if > it's possible to convert/evaluate an integer value to a string in a SQL > statement? My problem is that I have a column (col1) defined as an > integer, and I would like to find all rows that contain part of the number. > For example, I issue a query to locate all rows where col1 contains the > number 5678. The rows to be returned would include values 1356789, 443 > 5678, 567899, etc. > > I know I can solve this issue by creating a temporary table containing all > distinct col1 values which would be inserted into a string column, and then > issue a SQL statement w/ the like clause. However, this is not the most > desirable way. > > Any assistance, or ideas would be appreciated. > > I can be reached at jhimschoot@crowechizek.com. Thanks for your time. hello, I not sure in IDS 7.30, in my case IDS 7.31 my developers use the function LPAD or RPAD