Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

parse out string field  in crystal

Posted on 2010-08-31
4
Medium Priority
?
624 Views
Last Modified: 2012-06-21
I have a string field that holds city, state zip I need to parse out state for a crystal reprot
0
Comment
Question by:patsylipp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 12

Accepted Solution

by:
JayConverse earned 1000 total points
ID: 33572569
Press F1 and take a look at the Split() function.  Assuming consistent formatting of the data, i.e.,

city{COMMA}{SPACE}state{space}zip

You would split once on ", " and take the second array element

then split again on " " and take the first array element

0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 1000 total points
ID: 33572980
Or if you just need the state always
This assumes you always have a city and state

Split({YourField}," ")[2]

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 33574109
mlmcc,

 That won't work so well with city names that are 2 or more words.  But, then again, what are the odds of that happening?  ;-)

 James
0
 
LVL 19

Expert Comment

by:GJParker
ID: 33574598
It woudl be far simpler to help you if you at least provided a sample of your data format rather than having to guess.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question