I have a postal code and divided it into 2 variables: the first, where the first 4 numbers appear and the second one where the last 3 appear.
Ex:
4300-234 - first = 4300 ; second = 234 .
I have a table in the database that has 3 columns referring to postal codes. The PC4
, where the first 4 numbers appear, the PC3
where the last 3 appear and the Desc
, where the corresponding descriptive appears, that is, where are these postal codes.
What I need is to compare my first variable with the PC4
column, compare the second variable with the PC3
column, and then when my variables are equal to the columns PC4
and PC3
, I want receive the corresponding data from column DESC
.