Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need assistance with substr

Status
Not open for further replies.

bflochick

MIS
Jul 9, 2002
49
US
I general use Impromptu and have the ability to create special table field joins, it appears I cannot do this in crystal. I was going to set up something in the select expert and I am having trouble finding the correct syntax. Basically the sql from Impromptu looks like this substr(table.field,15,6)=table.field. I cannot see how I would do this in crystal. Basically I need to say a certain field in one table is equal to another field in another table, position 15, 6 characters long.
 
Hi there,

You could use the following code in your formula

mid({Field},15,21)

This will give you the 15th through to the 21st characters.
i.e start at 15 and continuing for 6 characters.

HTH

Steve
 
Thank you!! Sometimes the transition is hard when you are used to a certain program!
 
Actually, the syntax should be:

mid({Field},15,6)

For better performance, you might want to try using a SQL expression like {%substr}:

(substr(table1.`field`,15,6))

Then use a record selection formula like:

{%substr} = {table2.field}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top