-
February 19th, 2013, 02:22 PM
#1
Splitting a field with the delimiter "and"
I have a sql database and working in Crystal reports 10.
I am populating a form that will be sent to our parents.
I have a field that contains "wife's first name "and" husband's first name". ex. Kim and Robert
The report should look like:
Cell for Robert xxx-xxx-xxx
Cell for Kim xxx-xxx-xxx
Using
if {phone_full.phntype}= "cpd" then
"Cell for "+if instr({name_full.namefirst},'and',1)>0
then
mid({name_full.namefirst},(instr({name_full.namefirst},'and')+4))
I can get the first line regarding Robert.
I haven't been able to split the record to include only Kim's name
if {phone_full.phntype}= "cpm" then
"Cell for "+if instr({name_full.namefirst},'and',2)<0
then
mid({name_full.namefirst},(instr({name_full.namefirst},'and',1)+1))
This pulls Cell for "Kim and Robert"
Not sure if I'm using this correctly but I just want to pull out "Kim" from the {name_full.namefirst} field.
Can someone help?
Thank you so much!
Lisa H
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|