Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Up to 100,000 records can be processed with the freeware version!
Flowheater Chart

Address split into streetname and number

  • FlowHeater-Team
  • avatar Topic Author
  • Offline
  • Admin
  • Admin
More
6 years 2 weeks ago #3489 by FlowHeater-Team
Hey guys,

What i need to do is write from an Access database to a MySql database. my issue is in the address line. i need to split the streetname and number, but there is no clear indication of where i can split the address.

For example:
Schmiedestr. 13 - 15
Im Gewerbepark 26-30
Küferstr. 10 a
Schützenhofstr. 113 a

I can't find a clear place tosplit it and i can find a way to filter it out. Maybe you guys have seen this issue before and know how to bypass it.

Thanks in advance guys!

Kind regards,
Jonas
Request received via email

Best wishes
Robert Stark

Please Log in or Create an account to join the conversation.

  • FlowHeater-Team
  • avatar Topic Author
  • Offline
  • Admin
  • Admin
More
6 years 2 weeks ago #3490 by FlowHeater-Team
Replied by FlowHeater-Team on topic Address split into streetname and number - Post(3490)
Hi Jonas,

For this special topic, you need the help of the .NET Script Heater and thelittle script below. The script search for the first number position in the street name. If a number was found the script adds a delimiter in the street name, for example -#-

Afterwards you can split this with the delimiter extended street name withthe String Split Heater into two separate parts. You´ll find an example
attached.

C# script
Code:
string delimiter = "-#-"; public object DoWork() {   if (InValues.Length != 1)     throw new Exception("one input parameter expected!");   // access the first input parameter   string val = (string)InValues[0].GetString();   // find the position of the first numeric character   int pos = val.IndexOfAny(new char [] {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'});   if (pos > 0)   {     string street = val.Substring(0, pos);     string number = val.Substring(pos);     val = street + delimiter + number;   }   else     val += delimiter;     return val; }

File Attachment:

File Name: address-split.zip
File Size:2 KB

Best wishes
Robert Stark

Please Log in or Create an account to join the conversation.

More
6 years 2 weeks ago #3491 by Jonas Boudewijns
Replied by Jonas Boudewijns on topic Address split into streetname and number - Post(3491)
Works like a charm, thank you!

Please Log in or Create an account to join the conversation.

Time to create page: 0.262 seconds
FlowHeater Logo

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Legal information

Support & Contact

Contact

Phone:
0951 / 9933 9792

eMail:
This email address is being protected from spambots. You need JavaScript enabled to view it.


Copyright © 2009-2024 by FlowHeater GmbH. All rights reserved.