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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table linking with substrings

Status
Not open for further replies.

pen81

Programmer
Oct 27, 2004
62
GB
I am using Crystal 10 and MySQL 5.0. I have two tables with string fields that are linked, but one is a substring of the other.

With MySQL I would do this:

table1.field1 = substring(table2.field1,1,8)

to ignore the first character and only consider the following 8 characters.

How can I do this in Crystal 10?
 
Under the MySQL data source you'll see Add Command, select that and paste in your SQL as the data source.

A better alternative would be to create a View on MySQL as the data source, after having fired your dba for allowing this design.

-k
 
Thanks thats most helpful, using a view.

I think I will improve the design and split the field into seperate fields.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top