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.
Flowheater Download

Address split into streetname and number

  • FlowHeater-Team
  • Topic Author
  • Offline
  • Admin
  • Admin
More
5 years 4 months ago #3489 by FlowHeater-Team
Address split into streetname and number was created 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

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Please Log in to join the conversation.

  • FlowHeater-Team
  • Topic Author
  • Offline
  • Admin
  • Admin
More
5 years 4 months ago #3490 by FlowHeater-Team
Replied by FlowHeater-Team on topic Address split into streetname and number
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

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Attachments:

Please Log in to join the conversation.

More
5 years 4 months ago #3491 by Jonas Boudewijns
Replied by Jonas Boudewijns on topic Address split into streetname and number
Works like a charm, thank you!

Please Log in to join the conversation.

Time to create page: 0.265 seconds

FlowHeater - The Data Specialist

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

Rechtliches

Support & Contact

Kontaktinformation

Telefon:0951 / 99339792 E-Mail:This email address is being protected from spambots. You need JavaScript enabled to view it.

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