|
This isn't necessarily a SQL question - this can be done through a Crystal formula.
I might try something like this using arrays and the Split function:
StringVar Array url := Split({MyTable.URLField}, "/");
StringVar Array txt := Split(url, "?");
txt[1]
The first line will split the data based on the "/" character, so that the last element of the array, based on your example, will contain "department.asp?FID=8907".
The next line will split the data based on the "?" so that the first element of the array will contain "department.asp".
Note that the third line has no semi-colon on the end of it while the other two lines do. This lack of semi-colon tells Crystal that this is the value that needs to be displayed or passed to another formula.
-Dell
|