I have to access data from a database that has a column that is defined as CHAR(5). The data has leading spaces. Data has been entered into the field with leading spaces to fill the CHAR(5). When I try to pad the input variable to fill the CHAR(5) so that I may say
"WHERE char5_column_value = $VarValue".
The variable gets stripped down to a maximum of 1 space character on the left and therefore fails. Other than changing the data in the database by stripping off leading zeroes. Are there any other suggestions how I may handle this.
Thanks in advance.
"WHERE char5_column_value = $VarValue".
The variable gets stripped down to a maximum of 1 space character on the left and therefore fails. Other than changing the data in the database by stripping off leading zeroes. Are there any other suggestions how I may handle this.
Thanks in advance.