TomSalvato
Technical User
Hello all,
I have a data field (string) that looks like this:
11-aa-333-44-555-6666
While the components of the string can vary in size, I ALWAYS want the 2nd component of the string. 'aa' in this case.
In standard formulas, I can just use the split function to parse it out:
split({table2.field},"-")[2]
But I'm trying it in an SQL expression field, and either Crystal or Oracle doesn't seem to like it. Here's how I'm trying it ...
(
select max("table1"."DESCRIPTION")
from "db"."table1"
where "table1"."VALUE" = split("table2"."field","-")[2]
)
Any ideas would be appreciated.
-TS
using CR2008
I have a data field (string) that looks like this:
11-aa-333-44-555-6666
While the components of the string can vary in size, I ALWAYS want the 2nd component of the string. 'aa' in this case.
In standard formulas, I can just use the split function to parse it out:
split({table2.field},"-")[2]
But I'm trying it in an SQL expression field, and either Crystal or Oracle doesn't seem to like it. Here's how I'm trying it ...
(
select max("table1"."DESCRIPTION")
from "db"."table1"
where "table1"."VALUE" = split("table2"."field","-")[2]
)
Any ideas would be appreciated.
-TS
using CR2008