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

Search entire memo field

Status
Not open for further replies.

mgallot

MIS
Jan 22, 2001
93
US
I have Crystal 9.0 and have a Sql Server database. I used to be able to use an SQL expression to search the first 254 char of a memo field. For some reason, that just stopped working. Now I have upgraded to Crystal 9.0 and would like to get that search working again. I want to select records based upon whether a particular word exists in a memo field. I read a post that said you can search a much larger portion of memo fields, but how?
 
You don't need a special method in CR 9, just use the instr() function in a formula within CR 9, it supports large data types now.

As for searching memo fields in SQL Expressions prior to CR 9, since the SQL expression is processed on the database, you should have been able to search any size.

-k
 
I dont know why this isnt working for me. The statement looks like this:

instr({table.fieldname}, "%error%) > 0

and I just keyed it in to my selection criteria. No errors are found, but it never pulls the records. Any ideas?
 
Change the statement to

Code:
instr({table.fieldname}, "error") > 0


-LW
 
The * is used in LIKE statements in the record selection rather than a %.

You can use a like statement such as:

{table.field} like "*error*"

This should prove much faster than the instr referenced by LW as it will pass it to the database for back end processing.

-k
 
I should have mentioned that you want to check the Database->Show SQL Query to awscertain what is being passed within the SQL.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top