Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Always own up. Errors multiply when concealed
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

19
March

How Do I Extract all the Characters before a Specific Character in a String Field?

During a recent Crystal Reports XI report design project two tables needed to be linked together, where in one  table the field only contained the user name, in the second table the field contained the user email address, which consisted of the user name, plus the organisational domain.


Solution:

In order to link the to two tables together a formula was created to strip the username element from the organisation domain, before the @ sign of the email address field.

The resultant SQL formula:
SUBSTRING([E-mail], 0, CHARINDEX('@', [E-mail], 0))


If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us


MAKE A COMMENT

Name *

Email Address *

Comment *

To prove you are human what is:

9 + 53 =