Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> How to parse StreetAddresses String into individual fields
I have to take a string (from a data entry form) that contains Street
Addresses such as (17824 NE 12TH ST APT 10-301) and have it parsed
field by field and pass it into a PL/SQL stored procedured, format the
string so that the individual fields are set to a specific column. For
example
FullAddress = '17824 NE 12TH ST APT 10-301' HouseNumber = 17824
Prefix = NE Name = 12TH Type = ST
Once the fields are parsed column by column, have to reassemble them (by concatenation) and check against an existing string in the database. That is:
streetnm varchar2(75);
concatendated_address varchar2(75);
concatenated_address := HouseNumber || ' ' || Prefix || ' ' || Name ||
' ' || Type || ' ' || UnitType || ' ' || unit;
select fulladdress into streetnm from lisaddress where fulladdress
like 'concatenated_address';
if rowcount > 0 then
'execute another procedure that takes concatenated_address as a
parameter
endif
Could you Show me the steps you do to accomplish this.
Thanks for your time,
Raj Received on Tue Oct 09 2001 - 13:50:43 CDT
![]() |
![]() |