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

Problem with SUBSTR SQL Expression 1

Status
Not open for further replies.

M8tt

Technical User
Feb 11, 2003
43
NL
When using the following syntax in an SQL Expression:

{fn SUBSTRING(C0FNAT."WORKINGRELATIVEPATH",7,1)}

I am getting the following errors:

ORA-00911; invalid character
and
Error in compiling SQL Expression: Invalid function found here.

The field in question is a blob field in an Oracle 8 database. I have tried using substr but the result is the same.

Bizarrely I have used the same syntax elsewhere to pick up another blob field in the same database and this works. Anyone have any ideas?

Thanks.
 
You have two options, though if you're using ODBC, make sure that you're using the Crystal supplied ODBC driver:

-Don't let Crystal do the SQL construction (using the fn substring, instead use the actual substring function in Oracle:

SUBSTR(C0FNAT."WORKINGRELATIVEPATH",7,1)

If that fails, try casting the blob field to a varchar within the substr function in the SQL Expression.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top